home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / vm / vm-vars.el.z / vm-vars.el
Encoding:
Text File  |  1998-05-21  |  136.8 KB  |  3,385 lines

  1. ;;; VM user and internal variable initialization
  2. ;;; Copyright (C) 1989-1998 Kyle E. Jones
  3. ;;;
  4. ;;; This program is free software; you can redistribute it and/or modify
  5. ;;; it under the terms of the GNU General Public License as published by
  6. ;;; the Free Software Foundation; either version 1, or (at your option)
  7. ;;; any later version.
  8. ;;;
  9. ;;; This program is distributed in the hope that it will be useful,
  10. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. ;;; GNU General Public License for more details.
  13. ;;;
  14. ;;; You should have received a copy of the GNU General Public License
  15. ;;; along with this program; if not, write to the Free Software
  16. ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. (provide 'vm-vars)
  19.  
  20. (defvar vm-init-file "~/.vm"
  21.   "*Startup file for VM that is loaded the first time you run VM
  22. in an Emacs session.")
  23.  
  24. (defvar vm-preferences-file "~/.vm.preferences"
  25.   "*Secondary startup file for VM, loaded after vm-init-file.
  26. This file is written and overwritten by VM and is not meant for
  27. users to edit directly.")
  28.  
  29. (defvar vm-primary-inbox "~/INBOX"
  30.   "*Mail is moved from the system mailbox to this file for reading.")
  31.  
  32. (defvar vm-crash-box "~/INBOX.CRASH"
  33.   "*File in which to store mail temporarily while it is transferred from
  34. the system mailbox to the primary inbox.  If a crash occurs
  35. during this mail transfer, any missing mail will be found in this
  36. file.  VM will do crash recovery from this file automatically at
  37. startup, as necessary.")
  38.  
  39. (defvar vm-keep-crash-boxes nil
  40.   "*Non-nil value should be a string specifying a directory where
  41. your crash boxes should be moved after VM has copied new mail
  42. out of them.  This is a safety measure.  In at least one case a
  43. pointer corruption bug inside Emacs has caused VM to believe that
  44. it had copied information out of the crash box when it in fact
  45. had not.  VM then deleted the crash box, losing the batch of
  46. incoming mail.  This is an exceedingly rare problem, but if you
  47. want to avoid losing mail if it happens, set vm-keep-crash-boxes
  48. to point to a directory in the same filesystem as all your
  49. crash boxes.  Each saved crash box will have a unique name based
  50. on the current date and time the box was saved.  You will need to
  51. clean out this directory from time to time; VM does not do so.
  52.  
  53. A nil value means VM should just delete crash boxes after it
  54. has copied out the mail.")
  55.  
  56. (defvar vm-index-file-suffix nil
  57.   "*Suffix used to construct VM index file names.
  58. When VM visits a folder, it checks for the existence of a file
  59. whose name is the folder's file name with the value of this
  60. variable appended to it.  If found, the file's contents will be
  61. used to tell VM about the contents of the folder.  This is faster
  62. than parsing the folder itself.
  63.  
  64. When you save a folder, the index file will be rewritten with
  65. updated informatoin about the folder.
  66.  
  67. A nil value means VM should not read or write index files.")
  68.  
  69. ;; use this function to access vm-spool-files on the fly.  this
  70. ;; allows us to use environmental variables without setting
  71. ;; vm-spool-files at load time and thereby making it hard to dump an
  72. ;; Emacs containing a preloaded VM.
  73. (defun vm-spool-files ()
  74.   (or vm-spool-files
  75.       (and (setq vm-spool-files (getenv "MAILPATH"))
  76.        (setq vm-spool-files
  77.          (vm-parse vm-spool-files
  78.                "\\([^:%?]+\\)\\([%?][^:]*\\)?\\(:\\|$\\)")))
  79.       (and (setq vm-spool-files (getenv "MAIL"))
  80.        (setq vm-spool-files (list vm-spool-files)))))
  81.  
  82. (defvar vm-spool-files nil
  83.   "*If non-nil this variable's value should be a list of strings 
  84. or a list of lists.
  85.  
  86. If the value is a list of strings, the strings should name files
  87. that VM will check for incoming mail instead of the default place
  88. VM thinks your system mailbox is.  Mail will be moved from these
  89. mailboxes to your primary inbox as specified by vm-primary-inbox,
  90. using vm-crash-box as a waystation.
  91.  
  92. If the value is a list of lists, each sublist should be of the form
  93.  
  94.     (INBOX SPOOLNAME CRASHBOX)
  95.  
  96. INBOX, SPOOLNAME and CRASHBOX are all strings.
  97.  
  98. INBOX is the folder where you want your new mail to be moved when
  99. you type 'g' (running vm-get-new-mail) in VM.  It is where you
  100. will read the mail.
  101.  
  102. SPOOLNAME is where the mail system leaves your incoming mail,
  103. e.g. /var/spool/mail/kyle.  It can also be a mailbox
  104. specification of the form, \"po:USER\", where USER is a user
  105. name.  VM will pass this specification to the movemail program.
  106. It is up to movemail to interpret it and figure out where to find
  107. your mailbox.  Some systems use special authentication methods that
  108. are only accessible via the movemail program.
  109.  
  110. SPOOLNAME can also be a POP maildrop.
  111.  
  112.     A POP maildrop specification has the following format:
  113.  
  114.        \"HOST:PORT:AUTH:USER:PASSWORD\"
  115.  
  116.     HOST is the host name of the POP server
  117.     PORT is the TCP port number to connect to (should normally be 110).
  118.     USER is the user name sent to the server.
  119.     PASSWORD is the secret shared by you and the server for
  120.     authentication purposes.  How is it used depends on the value of
  121.     the AUTH parameter.  If the PASSWORD is \"*\", VM will prompt
  122.     you for the password the first time you try to retrieve mail from
  123.     maildrop.  If the password is valid, VM will not ask you for the
  124.     password again during this Emacs session.
  125.  
  126.     AUTH is the authentication method used to convince the server you
  127.     should have access to the maildrop.  Acceptable values are
  128.     \"pass\", \"rpop\" and \"apop\".  For \"pass\", the PASSWORD is sent to
  129.     the server with the POP PASS command.  For \"rpop\", the PASSWORD
  130.     should be the string to be sent to the server via the RPOP
  131.     command.  In this case the string is not really a secret;
  132.     authentication is done by other means.  For \"apop\", an MD5 digest
  133.     of the PASSWORD appended to the server timestamp will be sent to
  134.     the server with the APOP command.  In order to use \"apop\" you
  135.     will have to set the value of vm-pop-md5-program appropriately to
  136.     point at the program that will generate the MD5 digest that VM
  137.     needs.
  138.  
  139. CRASHBOX is the temporary file that VM uses to store mail in
  140. transit between the SPOOLNAME and the INBOX.  If the system
  141. crashes or Emacs dies while mail is being moved, and the new
  142. mail is not in the SPOOLNAME or the INBOX, then it will be in
  143. the CRASHBOX.
  144.  
  145. There can be multiple entries with the same INBOX value, but a
  146. particular SPOOLNAME should appear only once.  CRASHBOXes should
  147. not be shared among different INBOXes, but you can use the same
  148. CRASHBOX/INBOX pair with a different SPOOLNAME.
  149.  
  150. vm-spool-files will default to the value of the shell
  151. environmental variables MAILPATH or MAIL if either of these
  152. variables are defined and no particular value for vm-spool-files
  153. has been specified.")
  154.  
  155. (defvar vm-spool-file-suffixes nil
  156.   "*List of suffixes to be used to create possible spool file names
  157. for folders.  Example:
  158.  
  159.   (setq vm-spool-file-suffixes '(\".spool\" \"-\"))
  160.  
  161. If you visit a folder ~/mail/beekeeping, when VM attempts to
  162. retrieve new mail for that folder it will look for mail in
  163. ~/mail/beekeeping.spool and ~/mail/beekeeping- in addition to
  164. scanning vm-spool-files for matches.
  165.  
  166. The value of vm-spool-files-suffixes will not be used unless
  167. vm-crash-box-suffix is also defined, since a crash box is
  168. required for all mail retrieval from spool files.")
  169.  
  170. (defvar vm-crash-box-suffix nil
  171.   "*String suffix used to create possible crash box file names for folders.
  172. When VM uses vm-spool-file-suffixes to create a spool file name,
  173. it will append the value of vm-crash-box-suffix to the folder's
  174. file name to create a crash box name.")
  175.  
  176. (defvar vm-make-spool-file-name nil
  177.   "*Non-nil value should be a function that returns a spool file name
  178. for a folder.  The function will be called with one argument, the
  179. folder's file name.  If the folder does not have a file name,
  180. the function will not be called.")
  181.  
  182. (defvar vm-make-crash-box-name nil
  183.   "*Non-nil value should be a function that returns a crash box file name
  184. for a folder.  The function will be called with one argument, the
  185. folder's file name.  If the folder does not have a file name,
  186. the function will not be called.")
  187.  
  188. (defvar vm-pop-md5-program "md5"
  189.   "*Program that reads a message on its standard input and writes an
  190. MD5 digest on its output.")
  191.  
  192. (defvar vm-pop-max-message-size nil
  193.   "*If VM is about to retrieve via POP a message larger than this size
  194. (in bytes) it will ask the you whether it should retrieve the message.
  195.  
  196. If VM is retrieving mail automatically because vm-auto-get-new-mail is
  197. set to a numeric value then you will not be prompted about large messages.
  198. This is to avoid prompting you while you're typing in another buffer.
  199. In this case the large message will be skipped with a warning
  200. message.
  201.  
  202. A nil value for vm-pop-max-message-size means no size limit.")
  203.  
  204. (defvar vm-pop-messages-per-session nil
  205.   "*Non-nil value should be a integer specifying how many messages to
  206. retrieve per POP session.  When you type 'g' to get new mail, VM
  207. will only retrieve that many messages from any particular POP maildrop.
  208. To retrieve more messages, type 'g' again.
  209.  
  210. A nil value means there's no limit.")
  211.  
  212. (defvar vm-pop-bytes-per-session nil
  213.   "*Non-nil value should be a integer specifying how many bytes to
  214. retrieve per POP session.  When you type 'g' to get new mail, VM
  215. will only retrieve messages until the byte limit is reached on
  216. any particular POP maildrop.  To retrieve more messages, type 'g'
  217. again.
  218.  
  219. A nil value means there's no limit.")
  220.  
  221. (defvar vm-pop-expunge-after-retrieving t
  222.   "*Non-nil value means immediately delete messages from a POP mailbox
  223. after retrieving them.  A nil value means messages will be left
  224. in the POP mailbox until you run vm-expunge-pop-messages.
  225.  
  226. This variable only affects POP mailbox not listed in
  227. vm-pop-auto-expunge-alist (which see).")
  228.  
  229. (defvar vm-pop-auto-expunge-alist nil
  230.   "*List of POP mailboxes and values specifying whether messages
  231. should be automatically deleted from the mailbox after retrieval.
  232. The format of the list is
  233.  
  234.   ((MAILBOX . VAL) (MAILBOX . VAL) ...)
  235.  
  236. MAILBOX should be a pop mailbox specification as described in
  237. the documentation for the variable vm-spool-files.  If you have
  238. the POP password specified in the vm-spool-files entry, you do
  239. not have to specify it here as well.  Use `*' instead; VM will
  240. still understand that this mailbox is the same as the one in
  241. vm-spool-files that gives the password.
  242.  
  243. VAL should be nil if retrieved messages should be left in the
  244. corresponding POP mailbox, t if retrieved messages should be
  245. deleted from the mailbox immediately after retrieval.")
  246.  
  247. (defvar vm-recognize-pop-maildrops "^[^:]+:[^:]+:[^:]+:[^:]+:[^:]+"
  248.   "*Value if non-nil should be a regular expression that matches
  249. spool names found in vm-spool-files that should be considered POP
  250. maildrops.  A nil value tells VM that all the spool names are to
  251. be considered files.")
  252.  
  253. (defvar vm-auto-get-new-mail t
  254.   "*Non-nil value causes VM to automatically move mail from spool files
  255. to a mail folder when the folder is first visited.  Nil means
  256. you must always use vm-get-new-mail to pull in newly arrived messages.
  257.  
  258. If the value is a number, then it specifies how often (in
  259. seconds) VM should check for new mail and try to retrieve it.
  260. This is done asynchronously and may occur while you are editing
  261. other files.  It should not disturb your editing, except perhaps
  262. for a pause while the check is being done.")
  263.  
  264. (defvar vm-mail-check-interval 300
  265.   "*Numeric value specifies the number of seconds between checks
  266. for new mail.  The maildrops for all visited folders are checked.
  267.  
  268. A nil value means don't check for new mail.
  269.  
  270. Note that mail if new mail is found, it is not retrieved.  The
  271. buffer local variable vm-spooled-mail-waiting is set non-nil in
  272. the buffers of those folders that have mail waiting.  VM uses
  273. the displays \"Mail\" in the mode line of folders that have mail
  274. waiting.")
  275.  
  276. (defvar vm-spooled-mail-waiting nil
  277.   "Value is non-nil if there is mail waiting for the current folder.
  278. This variable's value is local in all buffers.
  279. VM maintains this variable, you should not set it.")
  280. (make-variable-buffer-local 'vm-spooled-mail-waiting)
  281.  
  282. (defvar vm-default-folder-type
  283.   (cond ((not (boundp 'system-configuration))
  284.      'From_)
  285.     ((or (string-match "-solaris" system-configuration)
  286.          (string-match "usg-unix-v" system-configuration)
  287.          (string-match "-ibm-aix" system-configuration))
  288.      'From_-with-Content-Length)
  289.     ((string-match "-sco" system-configuration)
  290.      'mmdf)
  291.     (t 'From_))
  292.   "*Default folder type for empty folders.
  293. If VM has to add messages that have no specific folder type to an
  294. empty folder, the folder will become this default type.
  295. Allowed types are:
  296.  
  297.    From_
  298.    From_-with-Content-Length
  299.    mmdf
  300.    babyl
  301.  
  302. Value must be a symbol, not a string. i.e. write
  303.  
  304.   (setq vm-default-folder-type 'From_)
  305.  
  306. in your .emacs or .vm file.
  307.  
  308. If you set this variable's value to From_-with-Content-Length you
  309. must set vm-trust-From_-with-Content-Length non-nil.")
  310.  
  311. (defvar vm-check-folder-types t
  312.   "*Non-nil value causes VM to check folder and message types for
  313. compatibility before it performs certain operations.
  314.  
  315. Before saving a message to a folder, VM will check that the destination folder
  316. is of the same type as the message to be saved.
  317.  
  318. Before incorporating message into a visited folder, VM will check that the
  319. messages are of the same type as that folder.
  320.  
  321. A nil value means don't do the checks.
  322.  
  323. If non-nil, VM will either convert the messages to the appropriate
  324. type before saving or incorporating them, or it will signal an
  325. error.  The value of vm-convert-folder-types determines which
  326. action VM will take.")
  327.  
  328. (defvar vm-convert-folder-types t
  329.   "*Non-nil value means that when VM checks folder types and finds
  330. a mismatch (see vm-check-folder-types), it will convert the
  331. source messages to the type of the destination folder, if it can.
  332.  
  333. If vm-check-folder-types is nil, then this variable isn't
  334. consulted.")
  335.  
  336. (defvar vm-trust-From_-with-Content-Length
  337.   (eq vm-default-folder-type 'From_-with-Content-Length)
  338.   "*Non-nil value means that if the first message in a folder contains
  339. a Content-Length header and begins with \"From \" VM can safely
  340. assume that all messages in the folder have Content-Length headers
  341. that specify the length of the text section of each message.  VM
  342. will then use these headers to determine message boundaries
  343. instead of the usual way of searching for two newlines followed by a
  344. line that begins with \"From \".
  345.  
  346. If you set vm-default-folder-type to From_-with-Content-Length you
  347. must set this variable non-nil.")
  348.  
  349. (defvar vm-visible-headers
  350.   '("Resent-"
  351.     "From:" "Sender:"
  352.     "To:" "Apparently-To:" "Cc:"
  353.     "Subject:"
  354.     "Date:")
  355.   "*List of headers that should be visible when VM first displays a message.
  356. These should be listed in the order you wish them presented.
  357. Regular expressions are allowed.  There's no need to anchor
  358. patterns with \"^\", as searches always start at the beginning of
  359. a line.  Put a colon at the end of patterns to get exact matches.
  360. For example, \"Date\" matches \"Date\" and \"Date-Sent\".  Header names
  361. are always matched case insensitively.
  362.  
  363. If the value of vm-invisible-header-regexp is nil, only the
  364. headers matched by vm-visible-headers will be displayed.
  365. Otherwise all headers are displayed except those matched by
  366. vm-invisible-header-regexp.  In this case vm-visible-headers
  367. specifies the order in which headers are displayed.  Headers not
  368. matching vm-visible-headers are display last.")
  369.  
  370. (defvar vm-invisible-header-regexp nil
  371.   "*Non-nil value should be a regular expression that tells what headers
  372. VM should NOT normally display when presenting a message.  All other
  373. headers will be displayed.  The variable vm-visible-headers specifies
  374. the presentation order of headers; headers not matched by
  375. vm-visible-headers are displayed last.
  376.  
  377. Nil value causes VM to display ONLY those headers specified in
  378. vm-visible-headers.")
  379.  
  380. (defvar vm-highlighted-header-regexp nil
  381.   "*Value specifies which headers to highlight.
  382. This is a regular expression that matches the names of headers that should
  383. be highlighted when a message is first presented.  For example setting
  384. this variable to \"From:\\\\|Subject:\" causes the From and Subject
  385. headers to be highlighted.
  386.  
  387. This does not work under version 18 Emacs.
  388.  
  389. If you're using XEmacs, you might want to use the builtin
  390. `highlight-headers' package instead.  If so, then you should set
  391. the variable vm-use-lucid-highlighting non-nil.  You'll need to
  392. set the various variables used by the highlight-headers package
  393. to customize highlighting.  vm-highlighted-header-regexp is
  394. ignored in this case.")
  395.  
  396. (defvar vm-use-lucid-highlighting
  397.   ;; (not (not ...)) to avoid the confusing value of 6.
  398.   (not (not (string-match "XEmacs" emacs-version)))
  399.   "*Non-nil means to use the `highlight-headers' package in XEmacs.
  400. Nil means just use VM's builtin header highlighting code.
  401.  
  402. FSF Emacs always uses VM's builtin highlighting code.")
  403.  
  404. (defvar vm-highlighted-header-face 'bold
  405.   "*Face to be used to highlight headers.
  406. The headers to highlight are specified by the vm-highlighted-header-regexp
  407. variable.
  408.  
  409. This variable is ignored under XEmacs if vm-use-lucid-highlighting is
  410. nil.  XEmacs' highlight-headers package is used instead.  See the
  411. documentation for the function `highlight-headers' to find out how to
  412. customize header highlighting using this package.")
  413.  
  414. (defvar vm-preview-lines 0
  415.   "*Non-nil value N causes VM to display the visible headers + N lines of text
  416. of a message when it is first presented.  The message is not actually
  417. flagged as read until it is exposed in its entirety.
  418.  
  419. A value of t causes VM to display as much of the message as will
  420. fit in the window associated with the folder buffer.
  421.  
  422. A nil value causes VM not to preview messages; no text lines are hidden and 
  423. messages are immediately flagged as read.")
  424.  
  425. (defvar vm-preview-read-messages nil
  426.   "*Non-nil value means to preview messages even if they've already been read.
  427. A nil value causes VM to preview messages only if new or unread.")
  428.  
  429. (defvar vm-display-using-mime t
  430.   "*Non-nil value means VM should display messages using MIME.
  431. MIME (Multipurpose Internet Mail Extensions) is a set of
  432. extensions to the standard Internet message format that allows
  433. reliable tranmission and reception of arbitrary data including
  434. images, audio and video as well as ordinary text.
  435.  
  436. A non-nil value for this variable means that VM will recognize
  437. MIME encoded messages and display them as specified by the
  438. various MIME standards specifications.
  439.  
  440. A nil value means VM will not display MIME messages any
  441. differently than any other message.")
  442.  
  443. ;; this is t because at this time (11 April 1997) Solaris is
  444. ;; generated too many mangled MIME version headers.  For the same
  445. ;; reason vm-mime-avoid-folding-content-type is also set to t.
  446. (defvar vm-mime-ignore-mime-version t
  447.   "*Non-nil value means ignore the version number in the MIME-Version
  448. header.  VM only knows how to decode and display MIME version 1.0
  449. messages.  Some systems scramble the MIME-Version header, causing
  450. VM to believe that it cannot display a message that it actually
  451. can display.  You can set vm-mime-ignore-mime-version non-nil if
  452. you use such systems.")
  453.  
  454. ;; try to avoid bad interaction with TM
  455. (defvar vm-send-using-mime (not (featurep 'mime-setup))
  456.   "*Non-nil value means VM should support sending messages using MIME.
  457. MIME (Multipurpose Internet Mail Extensions) is a set of
  458. extensions to the standard Internet message format that allows
  459. reliable tranmission and reception of arbitrary data including
  460. images, audio and video as well as traditional text.
  461.  
  462. A non-nil value for this variable means that VM will
  463.  
  464.   - allow you to attach files and messages to your outbound message.
  465.   - analyze the composition buffer when you send off a message and
  466.     encode it as needed.
  467.  
  468. A nil value means VM will not offer any support for composing
  469. MIME messages.")
  470.  
  471. (defvar vm-honor-mime-content-disposition nil
  472.   "*Non-nil value means use information from the Content-Disposition header
  473. to display MIME messages.  The Content-Disposition header
  474. specifies whether a MIME object should be displayed inline or
  475. treated as an attachment.  For VM, ``inline'' display means
  476. displaying the object in the Emacs buffer, if possible.
  477. Attachments will be displayed as a button that you can use
  478. mouse-2 to activate or mouse-3 to pull up a menu of options.")
  479.  
  480. (defvar vm-auto-decode-mime-messages nil
  481.   "*Non-nil value causes MIME decoding to occur automatically
  482. when a message containing MIME objects is exposed.  A nil value
  483. means that you will have to run the `vm-decode-mime-message'
  484. command (normally bound to `D') manually to decode and display
  485. MIME objects.")
  486.  
  487. (defvar vm-auto-displayed-mime-content-types '("text" "multipart")
  488.   "*List of MIME content types that should be displayed immediately
  489. after decoding.  Other types will be displayed as a button that
  490. the user must activate to display the object.
  491.  
  492. A value of t means that all types should be displayed immediately.
  493. A nil value means never display MIME objects immediately; only use buttons.
  494.  
  495. If the value is a list, it should be a list of strings, which
  496. should all be types or type/subtype pairs.  Example:
  497.  
  498.  (setq vm-auto-displayed-mime-content-types '(\"text\" \"image/jpeg\"))
  499.  
  500. If a top-level type is listed without a subtype, all subtypes of
  501. that type are assumed to be included.
  502.  
  503. Note that some types are processed specially, and this variable does not
  504. apply to them.
  505.  
  506.    multipart/digest messages are always displayed as a button to
  507.    avoid automatically visiting a new folder while you are moving
  508.    around in the current folder.
  509.  
  510.    message/partial messages are always displayed as a button,
  511.    because there always needs to be a way to trigger the assembly
  512.    of the parts into a full message.
  513.  
  514. Any type that cannot be displayed internally or externally will
  515. be displayed as a button that allows you to save the body to a
  516. file.")
  517.  
  518. (defvar vm-mime-internal-content-types t
  519.   "*List of MIME content types that should be displayed internally
  520. if Emacs is capable of doing so.  A value of t means that VM
  521. should always display an object internally if possible.  A nil
  522. value means never display MIME objects internally, which means VM
  523. have to run an external viewer to display MIME objects.
  524.  
  525. If the value is a list, it should be a list of strings.  Example:
  526.  
  527.  (setq vm-mime-internal-content-types '(\"text\" \"image/jpeg\"))
  528.  
  529. If a top-level type is listed without a subtype, all subtypes of
  530. that type are assumed to be included.
  531.  
  532. Note that all multipart types are always handled internally.
  533. There is no need to list them here.")
  534.  
  535. (defvar vm-mime-external-content-types-alist nil
  536.   "*Alist of MIME content types and the external programs used to display them.
  537. If VM cannot display a type internally or has been instructed not
  538. to (see the documentation for the vm-mime-internal-content-types
  539. variable) it will try to launch an external program to display that
  540. type.
  541.  
  542. The alist format is
  543.  
  544.  ( (TYPE PROGRAM ARG ARG ... ) ... )
  545.  
  546. TYPE is a string specifying a MIME type or type/subtype pair.
  547. Example \"text\" or \"image/jpeg\".  If a top-level type is
  548. listed without a subtype, all subtypes of that type are assumed
  549. to be included.
  550.  
  551. PROGRAM is a string naming a program to run to display an object.
  552. Any ARGS will be passed to the program as arguments.  The octets
  553. that compose the object will be written into a file and the name
  554. of the file will be passed to the program as its last argument.
  555.  
  556. Example:
  557.  
  558.  (setq vm-mime-external-content-types-alist
  559.        '(
  560.      (\"text/html\"     \"netscape\")
  561.      (\"image/gif\"     \"xv\")
  562.      (\"image/jpeg\"     \"xv\")
  563.      (\"video/mpeg\"     \"mpeg_play\")
  564.      (\"video\"         \"xanim\")
  565.     )
  566.  )
  567.  
  568. The first matching list element will be used.
  569.  
  570. No multipart message will ever be sent to an external viewer.")
  571.  
  572. (defvar vm-mime-type-converter-alist nil
  573.   "*Alist of MIME types and programs that can convert between them.
  574. If VM cannot display a content type, it will scan this list to
  575. see if the type can be converted into a type that it can display.
  576.  
  577. The alist format is
  578.  
  579.  ( (START-TYPE END-TYPE COMMAND-LINE ) ... )
  580.  
  581. START-TYPE is a string specifying a MIME type or type/subtype pair.
  582. Example \"text\" or \"image/jpeg\".  If a top-level type is
  583. listed without a subtype, all subtypes of that type are assumed
  584. to be included.
  585.  
  586. END-TYPE must be an exact type/subtype pair.  This is the type
  587. to which START-TYPE will be converted.
  588.  
  589. COMMAND-LINE is a string giving a command line to be passed to
  590. the shell.  The octets that compose the object will be written to
  591. the standard input of the shell command.
  592.  
  593. Example:
  594.  
  595.  (setq vm-mime-type-converter-alist
  596.        '(
  597.      (\"image/jpeg\"    \"image/gif\"    \"jpeg2gif\")
  598.      (\"text/html\"        \"text/plain\"    \"striptags\")
  599.     )
  600.  )
  601.  
  602. The first matching list element will be used.")
  603.  
  604. (defvar vm-mime-alternative-select-method 'best-internal
  605.   "*Value tells how to choose which multipart/alternative part to display.
  606. A MIME message of type multipart/alternative has multiple message
  607. parts containing the same information, but each part may be
  608. formatted differently.  VM will display only one of the parts.
  609. This variable tells VM how to choose which part to display.
  610.  
  611. A value of 'best means choose the part that is the most faithful to
  612. the sender's original content that can be displayed.
  613.  
  614. A value of 'best-internal means choose the best part that can be
  615. displayed internally, i.e. with the built-in capabilities of Emacs.
  616. If none of the parts can be displayed internally, behavior reverts to
  617. that of 'best.")
  618.  
  619. (defvar vm-mime-default-face-charsets '("us-ascii" "iso-8859-1")
  620.   "*List of character sets that can use the `default' face.
  621. For other characters sets VM will have to create a new face and assign
  622. a font to it that can be used to display that character set.")
  623.  
  624. (defvar vm-mime-charset-font-alist nil
  625.   "*Assoc list of character sets and fonts that can be used to display them.
  626. The format of the list is:
  627.  
  628.   ( (CHARSET . FONT) ...)
  629.  
  630. CHARSET is a string naming a MIME registered character set such
  631. as \"iso-8859-5\".  Character set names should be specified in
  632. lower case.
  633.  
  634. FONT is a string naming a font that can be used to display CHARSET.
  635.  
  636. An example setup might be:
  637.  
  638.   (setq vm-mime-charset-font-alist
  639.    '(
  640.      (\"iso-8859-7\" . \"-*-*-medium-r-normal-*-16-160-72-72-c-80-iso8859-7\")
  641.     )
  642.   )
  643.  
  644. This variable is only useful for character sets whose characters
  645. can all be encoded in single 8-bit bytes.  Also multiple fonts
  646. can only be displayed if you're running under a window system
  647. e.g. X windows.  So this variable will have no effect if you're
  648. running Emacs on a tty.
  649.  
  650. Note that under FSF Emacs any fonts you use must be the same height
  651. as your default font.  XEmacs does not have this limitation.")
  652.  
  653. (defvar vm-mime-button-face 'gui-button-face
  654.   "*Face used for text in buttons that trigger the display of MIME objects.")
  655.  
  656. (defvar vm-mime-button-format-alist
  657.   '(("text" . "%-35.35(%d, %c%) [%k to %a]")
  658.     ("multipart/alternative" . "%-35.35(%d%) [%k to %a]")
  659.     ("multipart/digest" . "%-35.35(%d, %n message%s%) [%k to %a]")
  660.     ("multipart" . "%-35.35(%d, %n part%s%) [%k to %a]")
  661.     ("message/partial" . "%-35.35(%d, part %N (of %T)%) [%k to %a]")
  662.     ("message" . "%-35.35(%d%) [%k to %a]")
  663.     ("audio" . "%-35.35(%d%) [%k to %a]")
  664.     ("video" . "%-35.35(%d%) [%k to %a]")
  665.     ("image" . "%-35.35(%d%) [%k to %a]")
  666.     ("application/octet-stream" . "%-35.35(%d, %f%) [%k to %a]"))
  667.   "*List of types and formats for MIME buttons.
  668. When VM does not display a MIME object immediately, it displays a
  669. button or tag line in its place that describes the object and what you
  670. have to do to display it.  This value of `vm-mime-button-format-alist'
  671. determines the format of the text in those buttons.
  672.  
  673. The format of the list is
  674.  
  675.   ((TYPE . FORMAT) (TYPE . FORMAT) ...)
  676.  
  677. The list is searched sequentially and the FORMAT corresponding to 
  678. the first TYPE that matches the type of the button's object is
  679. used.
  680.  
  681. TYPE should be a string specifying a top level type or a type/subtype
  682. pair.  If a top-level type is listed without a subtype, all subtypes
  683. of that type are assumed to be included.
  684.  
  685. FORMAT should be a string specifying the text of the button.  The
  686. string should not include a newline.  The string may contain the
  687. printf-like `%' conversion specifiers which substitute information
  688. about the MIME object into the button.
  689.  
  690. Recognized specifiers are:
  691.    a - the default action of the button.  E.g. \"display image\" for images,
  692.        \"display text\" for text objects and so on.
  693.    c - the character set of the object.  Usually only specified
  694.        for text objects.  Displays as \"us-ascii\" if the MIME object
  695.        does not specifiy a character set.
  696.    d - the content description of the object taken from the
  697.        Content-Description header, if present.  If the header
  698.        isn't present, a generic description is provided.
  699.    e - the content transfer encoding, either \"base64\" or
  700.        \"quoted-printable\".
  701.    f - the suggested file name to save the object into, as
  702.        specified either in the Content-DIsposition header, or the
  703.        \"name\" parameter for objects of type \"appliciation\".
  704.    k - how to activate the button.  Usually \"Press RETURN\" or
  705.        \"Click mouse-2\".
  706.    n - for multipart types this is the number of bundled parts,
  707.        messages, whatever.
  708.    N - for message/partial objects, the part number.
  709.    s - an empty string if %n would display \"1\", otherwise
  710.        \"s\".
  711.    t - the content type of the object, e.g. \"text/enriched\".
  712.    T - for message/partial objects, the total number of expected 
  713.        parts.  \"?\" is displayed if the object doens't specify
  714.        the total number of parts expected.
  715.    ( - starts a group, terminated by %).  Useful for specifying
  716.        the field width and precision for the concatentation of
  717.        group of format specifiers.  Example: \"%.35(%d, %t, %f%)\"
  718.        specifies a maximum display width of 35 characters for the
  719.        concatenation of the content description, content type and 
  720.        suggested file name.
  721.    ) - ends a group.
  722.  
  723. Use %% to get a single %.
  724.  
  725. A numeric field width may be given between the `%' and the specifier;
  726. this causes right justification of the substituted string.  A negative field
  727. width causes left justification.
  728.  
  729. The field width may be followed by a `.' and a number specifying
  730. the maximum allowed length of the substituted string.  If the
  731. string is longer than this value the right end of the string is
  732. truncated.  If the value is negative, the string is truncated on
  733. the left instead of the right.")
  734.  
  735. (defvar vm-mime-7bit-composition-charset "us-ascii"
  736.   "*Character set that VM should assume if it finds no character codes > 128
  737. in a composition buffer.  Composition buffers are assumed to use
  738. this character set unless the buffer contains a byte with the high bit set.
  739. This variable specifies what character set VM should assume if
  740. no such a character is found.
  741.  
  742. This variable is unused in XEmacs/MULE.  Since multiple character
  743. sets can be displayed in a single buffer under MULE, VM will map
  744. the file coding system of the composition buffer to a single MIME
  745. character set that can display all the buffer's characters.")
  746.  
  747. (defvar vm-mime-8bit-composition-charset "iso-8859-1"
  748.   "*Character set that VM should assume if it finds non-US-ASCII characters
  749. in a composition buffer.  Composition buffers are assumed to use
  750. US-ASCII unless the buffer contains a byte with the high bit set.
  751. This variable specifies what character set VM should assume if
  752. such a character is found.
  753.  
  754. This variable is unused in XEmacs/MULE.  Since multiple character
  755. sets can be displayed in a single buffer under MULE, VM will map
  756. the file coding system of the buffer to a single MIME character
  757. set that can display all the buffer's characters.")
  758.  
  759. (defvar vm-mime-8bit-text-transfer-encoding 'quoted-printable
  760.   "*Symbol specifying what kind of transfer encoding to use on 8bit
  761. text.  Characters with the high bit set cannot safely pass
  762. through all mail gateways and mail transport software.  MIME has
  763. two transfer encodings that convert 8-bit data to 7-bit for safe
  764. transport. Quoted-printable leaves the text mostly readable even
  765. if the recipient does not have a MIME-capable mail reader.  BASE64
  766. is unreadable without a MIME-capable mail reader, unless your name
  767. is U3BvY2s=.
  768.  
  769. A value of 'quoted-printable, means to use quoted-printable encoding.
  770. A value of 'base64 means to use BASE64 encoding.
  771. A value of '8bit means to send the message as is.
  772.  
  773. Note that this variable usually only applies to textual MIME
  774. content types.  Images, audio, video, etc. typically will have
  775. some attribute that makes VM consider them to be \"binary\",
  776. which moves them outside the scope of this variable.  For
  777. example, messages with line lengths of 1000 characters or more
  778. are considered binary, as are messages that contain carriage
  779. returns (ascii code 13) or NULs (ascii code 0).")
  780.  
  781. (defvar vm-mime-composition-armor-from-lines nil
  782.   "*Non-nil value means \"From \" lines should be armored before sending.
  783. A line beginning with \"From \" is considered a message separator
  784. by many mail delivery agents.  These agents will often insert a >
  785. before the word \"From\" to prevent mail readers from being
  786. confused.  This is proper behavior, but it breaks digitally signed
  787. messages, which require bit-perfect transport in order for the
  788. message contents to be considered genuine.
  789.  
  790. If vm-mime-composition-armor-from-lines is non-nil, a line
  791. beginning with \"From \" will cause VM to encode the message
  792. using either quoted-printable or BASE64 encoding so that the From
  793. line can be protected.")
  794.  
  795. (defvar vm-mime-attachment-auto-type-alist
  796.   '(
  797.     ("\\.jpe?g"        .    "image/jpeg")
  798.     ("\\.gif"        .    "image/gif")
  799.     ("\\.png"        .    "image/png")
  800.     ("\\.tiff?"        .    "image/tiff")
  801.     ("\\.html?"        .    "text/html")
  802.     ("\\.au"        .    "audio/basic")
  803.     ("\\.mpe?g"     .    "video/mpeg")
  804.     ("\\.ps"        .    "application/postscript")
  805.    )
  806.   "*Alist used to guess a MIME content type based on a file name.
  807. The list format is 
  808.  
  809.   ((REGEXP . TYPE) ...)
  810.  
  811. REGEXP is a string that specifies a regular expression.
  812. TYPE is a string specifying a MIME content type.
  813.  
  814. When a non-MIME file is attached to a MIME composition buffer,
  815. this list will be scanned until a REGEXP matches the file's name.
  816. The corresponding TYPE will be offered as a default when you are
  817. prompted for the file's type.")
  818.  
  819. (defvar vm-mime-max-message-size nil
  820.   "*Largest MIME message that VM should send without fragmentation.
  821. The value should be a integer which specifies the size in bytes.
  822. A message larger than this value will be split into multiple parts
  823. for transmission using the MIME message/partial type.")
  824.  
  825. (defvar vm-mime-attachment-save-directory nil
  826.   "*Non-nil value is a default directory for saving MIME attachments.
  827. When VM prompts you for a target file name when saving a MIME body,
  828. any relative pathnames will be relative to this directory.")
  829.  
  830. (defvar vm-mime-avoid-folding-content-type t
  831.   "*Non-nil means don't send folded Content- headers in MIME messages.
  832. `Folded' headers are headers broken into multiple lines as specified
  833. in RFC822 for readability and to avoid excessive line lengths.  At
  834. least one major UNIX vendor ships a version of sendmail that believes
  835. a folded Content-Type header is a syntax error, and returns any such
  836. message to sender.  A typical error message from such a sendmail
  837. version is,
  838.  
  839. 553 header syntax error, line \" charset=us-ascii\"
  840.  
  841. If you see one of these, setting vm-mime-avoid-folding-content-type
  842. non-nil may let your mail get through.")
  843.  
  844. (defvar vm-mime-base64-decoder-program nil
  845.   "*Non-nil value should be a string that names a MIME base64 decoder.
  846. The program should expect to read base64 data on its standard
  847. input and write the converted data to its standard output.")
  848.  
  849. (defvar vm-mime-base64-decoder-switches nil
  850.   "*List of command line flags passed to the command named by
  851. vm-mime-base64-decoder-program.")
  852.  
  853. (defvar vm-mime-base64-encoder-program nil
  854.   "*Non-nil value should be a string that names a MIME base64 encoder.
  855. The program should expect arbitrary data on its standard
  856. input and write base64 data to its standard output.")
  857.  
  858. (defvar vm-mime-base64-encoder-switches nil
  859.   "*List of command line flags passed to the command named by
  860. vm-mime-base64-encoder-program.")
  861.  
  862. (defvar vm-auto-next-message t
  863.   "*Non-nil value causes VM to use vm-next-message to advance to the next
  864. message in the folder if the user attempts to scroll past the end of the
  865. current messages.  A nil value disables this behavior.")
  866.  
  867. (defvar vm-honor-page-delimiters nil
  868.   "*Non-nil value causes VM to honor page delimiters (as specified by the
  869. Emacs page-delimiter variable) when scrolling through a message.")
  870.  
  871. (defvar vm-default-window-configuration
  872.   ;; startup = folder on bottom, summary on top
  873.   ;; quitting = full screen folder
  874.   ;; reading-message = folder on bottom, summary on top
  875.   ;; composing-message = full screen composition
  876.   ;; editing-message = full screen edit
  877.   ;; vm-summarize = folder on bottom, summary on top
  878.   '(
  879.     (startup
  880.      ((((top . 70) (left . 70)))
  881.       (((- (0 0 80 10) (0 10 80 40))
  882.     ((nil summary) (nil message))
  883.     ((nil nil nil t) (nil nil nil nil))))))
  884.     (quitting
  885.      ((((top . 70) (left . 70)))
  886.       (((0 0 80 40)
  887.     ((nil message))
  888.     ((nil nil nil t))))))
  889.     (reading-message
  890.      ((((top . 70) (left . 70)))
  891.       (((- (0 0 80 10) (0 10 80 40))
  892.     ((nil summary) (nil message))
  893.     ((nil nil nil t) (nil nil nil nil))))))
  894.     (composing-message
  895.      ((((top . 70) (left . 70)))
  896.       (((0 0 80 40)
  897.     ((nil composition))
  898.     ((nil nil nil t))))))
  899.     (editing-message
  900.      ((((top . 70) (left . 70)))
  901.       (((0 0 80 40)
  902.     ((nil edit))
  903.     ((nil nil nil t))))))
  904.     (vm-summarize
  905.      ((((top . 70) (left . 70)))
  906.       (((- (0 0 80 10) (0 10 80 40))
  907.     ((nil summary) (nil message))
  908.     ((nil nil nil t) (nil nil nil nil))))))
  909.    )
  910.   "Default window configuration for VM if the user does not specify one.
  911. If you want to completely turn off VM's window configuration
  912. feature, set this variable and vm-window-configuration-file to
  913. nil in your .vm file.
  914.  
  915. If you want to have a different window configuration setup than
  916. this, you should not set this variable directly.  Rather you
  917. should set the variable vm-window-configuration-file to point at
  918. a file, and use the command vm-save-window-configuration
  919. (normally bound to `WS') to modify part of this configuration to
  920. your liking.
  921.  
  922. WARNING: Don't point vm-window-configuration-file at your .vm or
  923. .emacs file.  Your window configuration file should start out as
  924. an empty or nonexistent file.  VM will repeatedly overwrite this
  925. file as you update your window configuration settings, so
  926. anything else you put into this file will go away.")
  927.  
  928. (defvar vm-window-configuration-file "~/.vm.windows"
  929.   "*Non-nil value should be a string that tells VM where to load
  930. and save your window configuration settings.  Your window
  931. configuration settings are loaded automatically the first time
  932. you run VM in an Emacs session, and tells VM how to set up
  933. windows depending on what you are doing inside VM.
  934.  
  935. The commands vm-save-window-configuration (normally bound to `WS') and
  936. vm-delete-window-configuration (bound to `WD') let you update this
  937. information; see their documentation for more information.
  938.  
  939. You cannot change your window configuration setup without giving
  940. vm-window-configuration-file a non-nil value.  A nil value causes
  941. VM to use the default window setup specified by the value of
  942. vm-default-window-configuration.
  943.  
  944. WARNING: Don't point vm-window-configuration-file at your .vm or
  945. .emacs file.  Your window configuration file should start out as
  946. an empty or nonexistent file.  VM will repeatedly overwrite this
  947. file as you update your window configuration settings, so
  948. anything else you put into this file will go away.")
  949.  
  950. (defvar vm-confirm-quit 0
  951.   "*Value of t causes VM to always ask for confirmation before quitting
  952. a VM visit of a folder.  A nil value means VM will ask only when messages
  953. will be lost unwittingly by quitting, i.e. not removed by intentional
  954. delete and expunge.  A value that is not nil and not t causes VM to ask
  955. only when there are unsaved changes to message attributes, or when messages
  956. will be unwittingly lost.")
  957.  
  958. (defvar vm-folder-directory nil
  959.   "*Directory where folders of mail are kept.")
  960.  
  961. (defvar vm-confirm-new-folders nil
  962.   "*Non-nil value causes interactive calls to vm-save-message
  963. to ask for confirmation before creating a new folder.")
  964.  
  965. (defvar vm-delete-empty-folders t
  966.   "*Non-nil value means remove empty (zero length) folders after saving
  967. A value of t means always remove the folders.
  968. A value of nil means never remove empty folders.
  969. A value that's not t or nil means ask before removing empty folders.")
  970.  
  971. (defvar vm-flush-interval 90
  972.   "*Non-nil value specifies how often VM flushes its cached internal
  973. data.  A numeric value gives the number of seconds between
  974. flushes.  A value of t means flush every time there is a change.
  975. Nil means don't do flushing until a message or folder is saved.
  976.  
  977. Normally when a message attribute is changed. VM keeps the record
  978. of the change in its internal memory and doesn't insert the
  979. changed data into the folder buffer until a particular message or
  980. the whole folder is saved to disk.  This makes normal Emacs
  981. auto-saving useless for VM folder buffers because the information
  982. you'd want to auto-save, i.e. the attribute changes are not in
  983. the buffer when it is auto-saved.
  984.  
  985. Setting vm-flush-interval to a numeric value will cause the VM's
  986. internal memory caches to be periodically flushed to the folder
  987. buffer.  This is done non-obtrusively, so that if you type
  988. something while flushing is occurring, the flush will abort
  989. cleanly and Emacs will respond to your keystrokes as usual.")
  990.  
  991. (defvar vm-visit-when-saving 0
  992.   "*Value determines whether VM will visit folders when saving messages.
  993. `Visiting' means that VM will read the folder into Emacs and append the
  994. message to the buffer instead of appending to the folder file directly.
  995. This behavior is ideal when folders are encrypted or compressed since
  996. appending plaintext directly to such folders is a ghastly mistake.
  997.  
  998. A value of t means VM will always visit folders when saving.
  999.  
  1000. A nil value means VM will never visit folders before saving to them, and
  1001. VM will generate an error if you attempt to save messages to a folder
  1002. that is being visited.  The latter restriction is necessary to insure
  1003. that the buffer and disk copies of the folder being visited remain
  1004. consistent.
  1005.  
  1006. A value that is not nil and not t means VM will save to a folder's
  1007. buffer if that folder is being visited, otherwise VM saves to the folder
  1008. file itself.")
  1009.  
  1010. (defvar vm-auto-folder-alist nil
  1011.   "*Non-nil value should be an alist that VM will use to choose a default
  1012. folder name when messages are saved.  The alist should be of the form
  1013. \((HEADER-NAME-REGEXP
  1014.    (REGEXP . FOLDER-NAME) ...
  1015.   ...))
  1016. where HEADER-NAME-REGEXP and REGEXP are strings, and FOLDER-NAME
  1017. is a string or an s-expression that evaluates to a string.
  1018.  
  1019. If any part of the contents of the message header whose name is
  1020. matched by HEADER-NAME-REGEXP is matched by the regular
  1021. expression REGEXP, VM will evaluate the corresponding FOLDER-NAME
  1022. and use the result as the default when prompting for a folder to
  1023. save the message in.  If the resulting folder name is a relative
  1024. pathname, then it will be rooted in the directory named by
  1025. vm-folder-directory, or the default-directory of the currently
  1026. visited folder if vm-folder-directory is nil.
  1027.  
  1028. When FOLDER-NAME is evaluated, the current buffer will contain
  1029. only the contents of the header matched by HEADER-NAME-REGEXP.
  1030. It is safe to modify this buffer.  You can use the match data
  1031. from any \\( ... \\) grouping constructs in REGEXP along with the
  1032. function buffer-substring to build a folder name based on the
  1033. header information.  If the result of evaluating FOLDER-NAME is a
  1034. list, then the list will be treated as another auto-folder-alist
  1035. and will be descended recursively.
  1036.  
  1037. Whether REGEXP is matched case sensitively depends on the value
  1038. of the variable vm-auto-folder-case-fold-search.  Header names
  1039. are always matched case insensitively.")
  1040.  
  1041. (defvar vm-auto-folder-case-fold-search nil
  1042.   "*Non-nil value means VM will ignore case when matching header
  1043. contents while doing automatic folder selection via the variable
  1044. vm-auto-folder-alist.")
  1045.  
  1046. (defvar vm-virtual-folder-alist nil
  1047.   "*Non-nil value should be a list of virtual folder definitions.
  1048.  
  1049. A virtual folder is a mapping of messages from one or more real folders
  1050. into what appears to be a single folder.  A virtual folder definition
  1051. specifies which real folders should be searched for prospective messages
  1052. and what the inclusion criteria are.
  1053.  
  1054. Each virtual folder definition should have the following form:
  1055.  
  1056.   (VIRTUAL-FOLDER-NAME
  1057.     ( (FOLDER-NAME ...)
  1058.       (SELECTOR [ARG ...]) ... )
  1059.     ... )
  1060.  
  1061. VIRTUAL-FOLDER-NAME is the name of the virtual folder being defined.
  1062. This is the name by which you and VM will refer to this folder.
  1063.  
  1064. FOLDER-NAME should be the name of a real folder.  There may be more than
  1065. one FOLDER-NAME listed, the SELECTORs within that sublist will apply to
  1066. them all.  If FOLDER-NAME is a directory, VM will assume this to mean that
  1067. all the folders in that directory should be searched.
  1068.  
  1069. The SELECTOR is a Lisp symbol that tells VM how to decide whether a message
  1070. from one of the folders specified by the FOLDER-NAMEs should be included
  1071. in the virtual folder.  Some SELECTORs require an argument ARG; unless
  1072. otherwise noted ARG may be omitted.
  1073.  
  1074. The recognized SELECTORs are:
  1075.  
  1076.    author          - matches message if ARG matches the author; ARG should be a
  1077.                      regular expression.
  1078.    author-or-recipient
  1079.            - matches message if ARG matches the author of
  1080.              the message or any of its recipients; ARG
  1081.              should be a regular expression.
  1082.    and             - matches the message if all its argument
  1083.                      selectors match the message.  Example:
  1084.                         (and (author \"Derek McGinty\") (new))
  1085.                      matches all new messages from Derek McGinty.
  1086.                      `and' takes any number of arguments. 
  1087.    any             - matches any message.
  1088.    deleted         - matches message if it is flagged for deletion.
  1089.    edited          - matches message if it has been edited.
  1090.    filed           - matches message if it has been saved with its headers.
  1091.    forwarded       - matches message if it has been forwarded using
  1092.              a variant of vm-forward-message or vm-send-digest.
  1093.    header          - matches message if ARG matches any part of the header
  1094.                      portion of the message; ARG should be a
  1095.                      regular expression. 
  1096.    header-or-text  - matches message if ARG matches any part of the
  1097.              headers or the text portion of the message;
  1098.              ARG should be a regular expression.
  1099.    label           - matches message if message has a label named ARG.
  1100.    less-chars-than - matches message if message has less than ARG
  1101.                      characters.  ARG should be a number.
  1102.    less-lines-than - matches message if message has less than ARG
  1103.                      lines.  ARG should be a number.
  1104.    more-chars-than - matches message if message has more than ARG
  1105.                      characters.  ARG should be a number.
  1106.    more-lines-than - matches message if message has more than ARG
  1107.                      lines.  ARG should be a number.
  1108.    marked          - matches message if it is marked, as with vm-mark-message.
  1109.    new             - matches message if it is new.
  1110.    not             - matches message only if its selector argument
  1111.                      does NOT match the message.  Example:
  1112.                        (not (deleted))
  1113.                      matches messages that are not deleted.
  1114.    or              - matches the message if any of its argument
  1115.                      selectors match the message.  Example:
  1116.                         (or (author \"Dave Weckl\") (subject \"drum\"))
  1117.                      matches messages from Dave Weckl or messages
  1118.                      with the word \"drum\" in their Subject header.
  1119.                      `or' takes any number of arguments.
  1120.    read            - matches message if it is neither new nor unread.
  1121.    recent       - matches message if it is new.
  1122.    recipient       - matches message if ARG matches any part of the recipient
  1123.                      list of the message.  ARG should be a regular expression.
  1124.    redistributed   - matches message if it has been redistributed using
  1125.              vm-resend-message.
  1126.    replied         - matches message if it has been replied to.
  1127.    sender       - matches message if ARG matches the author of
  1128.              the message; ARG should be a regular expression.
  1129.    sender-or-recipient
  1130.            - matches message if ARG matches the author of
  1131.              the message or any of its recipients; ARG
  1132.              should be a regular expression.
  1133.    sent-after      - matches message if it was sent after the date ARG.
  1134.                      A fully specified date looks like this:
  1135.                        \"31 Dec 1999 23:59:59 GMT\"
  1136.                      although the parts can appear in any order.
  1137.                      You can leave out any part and it will
  1138.                      default to the current date's value for that
  1139.                      part, with the exception of the hh:mm:ss
  1140.                      part which defaults to midnight.
  1141.    sent-before     - matches message if it was sent before the date ARG.
  1142.                      A fully specified date looks like this:
  1143.                        \"31 Dec 1999 23:59:59 GMT\"
  1144.                      although the parts can appear in any order.
  1145.                      You can leave out any part and it will
  1146.                      default to the current date's value for that
  1147.                      part, with the exception of the hh:mm:ss
  1148.                      part which defaults to midnight.
  1149.    subject         - matches message if ARG matches any part of the message's
  1150.                      subject; ARG should be a regular expression.
  1151.    text            - matches message if ARG matches any part of the text
  1152.                      portion of the message; ARG should be a
  1153.                      regular expression.
  1154.    unanswered       - matches message if it has not been replied to.
  1155.              Same as the `unreplied' selector.
  1156.    undeleted       - matches message if it has not been deleted.
  1157.    unedited       - matches message if it has not been edited.
  1158.    unfiled         - matches message if it has not been saved with its
  1159.              headers.
  1160.    unforwarded       - matches message if it has not been forwarded using
  1161.              vm-forward-message or vm-send-digest or one
  1162.              of their variants.
  1163.    unread          - matches message if it is not new and hasn't been read.
  1164.    unseen          - matches message if it is not new and hasn't been read.
  1165.              Same as `unread' selector.
  1166.    unredistributed - matches message if it has not been redistributed using
  1167.              vm-resend-message.
  1168.    unreplied       - matches message if it has not been replied to.
  1169.    written         - matches message if it has been saved without its headers.
  1170. ")
  1171.  
  1172. (defvar vm-virtual-mirror t
  1173.   "*Non-nil value causes the attributes of messages in virtual folders
  1174. to mirror the changes in the attributes of the underlying real messages.
  1175. Similarly, changes in the attributes of virtual messages will change the
  1176. attributes of the underlying real messages.  A nil value causes virtual
  1177. messages to have their own distinct set of attributes, apart from the
  1178. underlying real message.
  1179.  
  1180. This variable automatically becomes buffer-local when set in any
  1181. fashion.  You should set this variable only in your .vm or .emacs
  1182. file.  Use setq-default.  Once VM has been started, you should not
  1183. set this variable directly, rather you should use the command
  1184. vm-toggle-virtual-mirror, normally bound to `V M'.")
  1185. (make-variable-buffer-local 'vm-virtual-mirror)
  1186.  
  1187. (defvar vm-folder-read-only nil
  1188.   "*Non-nil value causes a folder to be considered unmodifiable by VM.
  1189. Commands that modify message attributes or messages themselves are disallowed.
  1190. Commands that add or delete messages from the folder are disallowed.
  1191. Commands that scan or allow the reading of messages are allowed but the
  1192. `new' and `unread' message flags are not changed by them.
  1193.  
  1194. This variable automatically becomes buffer-local when set in any
  1195. fashion.  You should set this variable only in your .vm or .emacs
  1196. file.  Use setq-default.  Once VM has been started, you should not
  1197. set this variable directly, rather you should use the command
  1198. vm-toggle-read-only, normally bound to C-x C-q.")
  1199. (make-variable-buffer-local 'vm-folder-read-only)
  1200.  
  1201. (defvar vm-included-text-prefix " > "
  1202.   "*String used to prefix included text in replies.")
  1203.  
  1204. (defvar vm-keep-sent-messages 1
  1205.   "*Non-nil value N causes VM to keep the last N messages sent from within VM.
  1206. `Keep' means that VM will not kill the VM mail buffer after you send a message
  1207. with C-c C-c (vm-mail-send-and-exit).  A value of 0 or nil causes VM never
  1208. to keep such buffers.  A value of t causes VM never to kill such buffers.
  1209.  
  1210. Note that these buffers will vanish once you exit Emacs.  To keep a permanent
  1211. record of your outgoing mail, use the mail-archive-file-name variable.")
  1212.  
  1213. (defvar vm-confirm-mail-send nil
  1214.   "*Non-nil means ask before sending a mail message.
  1215. This affects vm-mail-send and vm-mail-send-and-exit in Mail mode.")
  1216.  
  1217. (defvar vm-mail-header-from nil
  1218.   "*Non-nil value should be a string that will be appear as the body
  1219. of the From header in outbound mail messages.  A nil value means don't
  1220. insert a From header.  This variable also controls the inclusion and
  1221. format of the Resent-From header, when resending a message with
  1222. vm-resend-message.")
  1223.  
  1224. (defvar vm-reply-subject-prefix nil
  1225.   "*Non-nil value should be a string that VM should add to the beginning
  1226. of the Subject header in replies, if the string is not already present.
  1227. Nil means don't prefix the Subject header.")
  1228.  
  1229. (defvar vm-reply-ignored-addresses nil
  1230.   "*Non-nil value should be a list of regular expressions that match
  1231. addresses that VM should automatically remove from the recipient
  1232. headers of replies.  These addresses are removed from the headers
  1233. before you are placed in the message composition buffer.  So if
  1234. you see an address in the header you don't want you should remove
  1235. it yourself.
  1236.  
  1237. Case is ignored when matching the addresses.")
  1238.  
  1239. (defvar vm-reply-ignored-reply-tos nil
  1240.   "*Non-nil value should be a list of regular expressions that match
  1241. addresses that, if VM finds in a message's Reply-To header, VM
  1242. should ignore the Reply-To header and not use it for replies.  VM
  1243. will use the From header instead.
  1244.  
  1245. Case is ignored when matching the addresses.
  1246.  
  1247. This variable exists solely to provide a escape chute from
  1248. mailing lists that add a Reply-To: mailing list header, thereby
  1249. leaving no way to reply to just the author of a message.")
  1250.  
  1251. (defvar vm-in-reply-to-format "%i"
  1252.   "*String which specifies the format of the contents of the In-Reply-To
  1253. header that is generated for replies.  See the documentation for the
  1254. variable vm-summary-format for information on what this string may
  1255. contain.  The format should *not* end with a newline.
  1256. Nil means don't put an In-Reply-To header in replies.")
  1257.  
  1258. (defvar vm-included-text-attribution-format "%F writes:\n"
  1259.   "*String which specifies the format of the attribution that precedes the
  1260. included text from a message in a reply.  See the documentation for the
  1261. variable vm-summary-format for information on what this string may contain.
  1262. Nil means don't attribute included text in replies.")
  1263.  
  1264. (defvar vm-included-text-headers nil
  1265.   "*List of headers that should be retained in a message included in
  1266. a reply.  These should be listed in the order you wish them to
  1267. appear in the included text.  Regular expressions are allowed.
  1268. There's no need to anchor patterns with \"^\", as searches always
  1269. start at the beginning of a line.  Put a colon at the end of
  1270. patterns to get exact matches.  (E.g. \"Date\" matches \"Date\"
  1271. and \"Date-Sent\".)  Header names are always matched case
  1272. insensitively.
  1273.  
  1274. If the value of vm-included-text-discard-header-regexp is nil,
  1275. the headers matched by vm-included-text-headers are the only
  1276. headers that will be retained.
  1277.  
  1278. If vm-included-text-discard-header-regexp is non-nil, then only
  1279. headers matched by that variable will be omitted; all others will
  1280. be included.  vm-included-text-headers determines the header
  1281. order in that case, with headers not matching any in the
  1282. vm-included-text-headers list appearing last in the header
  1283. section of the included text.")
  1284.  
  1285. (defvar vm-included-text-discard-header-regexp nil
  1286.   "*Non-nil value should be a regular expression header that tells
  1287. what headers should not be retained in a message included in a
  1288. reply.  This variable along with vm-included-text-headers determines
  1289. which headers are retained.
  1290.  
  1291. If the value of vm-included-text-discard-header-regexp is nil,
  1292. the headers matched by vm-included-text-headers are the only headers
  1293. that will be retained.
  1294.  
  1295. If vm-included-text-discard-header-regexp is non-nil, then only
  1296. headers matched by this variable will not be retained; all
  1297. others will be included.  vm-included-text-headers determines the
  1298. header order in that case, with headers not matching any in
  1299. the vm-included-text-headers list appearing last in the header
  1300. section of the included text.")
  1301.  
  1302. (defvar vm-forwarding-subject-format "forwarded message from %F"
  1303.   "*String which specifies the format of the contents of the Subject
  1304. header that is generated for a forwarded message.  See the documentation
  1305. for the variable vm-summary-format for information on what this string
  1306. may contain.  The format should *not* end with nor contain a newline.
  1307. Nil means leave the Subject header empty when forwarding.")
  1308.  
  1309. (defvar vm-forwarded-headers nil
  1310.   "*List of headers that should be forwarded by vm-forward-message.
  1311. These should be listed in the order you wish them to appear in
  1312. the forwarded message.  Regular expressions are allowed.
  1313. There's no need to anchor patterns with \"^\", as searches always
  1314. start at the beginning of a line.  Put a colon at the end of
  1315. patterns to get exact matches.  (E.g. \"Date\" matches \"Date\"
  1316. and \"Date-Sent\".)  Header names are always matched case
  1317. insensitively.
  1318.  
  1319. If the value of vm-unforwarded-header-regexp is nil, the headers
  1320. matched by vm-forwarded-headers are the only headers that will be
  1321. forwarded.
  1322.  
  1323. If vm-unforwarded-header-regexp is non-nil, then only headers
  1324. matched by that variable will be omitted; all others will be
  1325. forwarded.  vm-forwarded-headers determines the forwarding order
  1326. in that case, with headers not matching any in the
  1327. vm-forwarded-headers list appearing last in the header section of
  1328. the forwarded message.")
  1329.  
  1330. (defvar vm-unforwarded-header-regexp "only-drop-this-header"
  1331.   "*Non-nil value should be a regular expression header that tells
  1332. what headers should not be forwarded by vm-forward-message.  This
  1333. variable along with vm-forwarded-headers determines which headers
  1334. are forwarded.
  1335.  
  1336. If the value of vm-unforwarded-header-regexp is nil, the headers
  1337. matched by vm-forwarded-headers are the only headers that will be
  1338. forwarded.
  1339.  
  1340. If vm-unforwarded-header-regexp is non-nil, then only headers
  1341. matched by this variable will not be forwarded; all others will
  1342. be forwarded.  vm-forwarded-headers determines the forwarding
  1343. order in that case, with headers not matching any in the
  1344. vm-forwarded-headers list appearing last in the header section of
  1345. the forwarded message.")
  1346.  
  1347. (defvar vm-forwarding-digest-type "mime"
  1348.   "*Non-nil value should be a string that specifies the type of
  1349. message encapsulation format to use when forwarding a message.
  1350. Legal values of this variable are:
  1351.  
  1352. \"rfc934\"
  1353. \"rfc1153\"
  1354. \"mime\"
  1355. nil
  1356.  
  1357. A nil value means don't use a digest, just mark the beginning and
  1358. end of the forwarded message.")
  1359.  
  1360. (defvar vm-burst-digest-messages-inherit-labels t
  1361.   "*Non-nil values means messages from a digest inherit the digest's labels.
  1362. Labels are added to messages with vm-add-message-labels, normally
  1363. bound to `l a'.")
  1364.  
  1365. (defvar vm-digest-preamble-format "\"%s\" (%F)"
  1366.   "*String which specifies the format of the preamble lines generated by 
  1367. vm-send-digest when it is invoked with a prefix argument.  One
  1368. line will be generated for each message put into the digest.  See the
  1369. documentation for the variable vm-summary-format for information
  1370. on what this string may contain.  The format should *not* end
  1371. with nor contain a newline.")
  1372.  
  1373. (defvar vm-digest-center-preamble t
  1374.   "*Non-nil value means VM will center the preamble lines that precede
  1375. the start of a digest.  How the lines will be centered depends on the
  1376. ambient value of fill-column.   A nil value suppresses centering.")
  1377.  
  1378. (defvar vm-digest-identifier-header-format "X-Digest: %s\n"
  1379.   "*Header to insert into messages burst from a digest.
  1380. Value should be a format string of the same type as vm-summary-format
  1381. that describes a header to be inserted into each message burst from a
  1382. digest.  The format string must end with a newline.")
  1383.  
  1384. (defvar vm-digest-burst-type "guess"
  1385.   "*Value specifies the default digest type offered by vm-burst-digest
  1386. when it asks you what type of digest you want to unpack.  Allowed
  1387. values of this variable are:
  1388.  
  1389.    \"rfc934\"
  1390.    \"rfc1153\"
  1391.    \"mime\"
  1392.    \"guess\"
  1393.  
  1394. rfc1153 digests have a preamble, followed by a line of exactly 70
  1395. dashes, with digested messages separated by lines of exactly 30 dashes.
  1396.  
  1397. rfc934 digests separate messages on any line that begins with a few
  1398. dashes, but doesn't require lines with only dashes or lines with a
  1399. specific number of dashes.  In the text of the message, any line
  1400. beginning with dashes is textually modified to be preceded by a dash
  1401. and a space to prevent confusion with message separators.
  1402.  
  1403. MIME digests use whatever boundary that is specified by the
  1404. boundary parameter in the Content-Type header of the digest.
  1405.  
  1406. If the value is \"guess\", and you take the default
  1407. response when vm-burst-digest queries you, VM will try to guess
  1408. the digest type.")
  1409.  
  1410. (defvar vm-digest-send-type "mime"
  1411.   "*String that specifies the type of digest vm-send-digest will use.
  1412. Legal values of this variable are:
  1413.  
  1414. \"rfc934\"
  1415. \"rfc1153\"
  1416. \"mime\"
  1417.  
  1418. ")
  1419.  
  1420. (defvar vm-rfc934-digest-headers
  1421.   '("Resent-"
  1422.     "From:" "Sender:"
  1423.     "To:" "Cc:"
  1424.     "Subject:"
  1425.     "Date:"
  1426.     "Message-ID:"
  1427.     "Keywords:")
  1428.   "*List of headers that should be appear in RFC 934 digests
  1429. created by VM.  These should be listed in the order you wish them
  1430. to appear in the digest.  Regular expressions are allowed.
  1431. There's no need to anchor patterns with \"^\", as searches always
  1432. start at the beginning of a line.  Put a colon at the end of
  1433. patterns to get exact matches.  (E.g. \"Date\" matches \"Date\"
  1434. and \"Date-Sent\".)  Header names are always matched case
  1435. insensitively.
  1436.  
  1437. If the value of vm-rfc934-digest-discard-header-regexp is nil, the headers
  1438. matched by vm-rfc934-digest-headers are the only headers that will be
  1439. kept.
  1440.  
  1441. If vm-rfc934-digest-discard-header-regexp is non-nil, then only
  1442. headers matched by that variable will be discarded; all others
  1443. will be kept.  vm-rfc934-digest-headers determines the order of
  1444. appearance in that case, with headers not matching any in the
  1445. vm-rfc934-digest-headers list appearing last in the headers
  1446. of the digestified messages.")
  1447.  
  1448. (defvar vm-rfc934-digest-discard-header-regexp nil
  1449.   "*Non-nil value should be a regular expression header that tells
  1450. what headers should not appear in RFC 934 digests created by VM.  This
  1451. variable along with vm-rfc934-digest-headers determines which headers
  1452. are kept and which are discarded.
  1453.  
  1454. If the value of vm-rfc934-digest-discard-header-regexp is nil, the headers
  1455. matched by vm-rfc934-digest-headers are the only headers that will be
  1456. kept.
  1457.  
  1458. If vm-rfc934-digest-discard-header-regexp is non-nil, then only
  1459. headers matched by this variable will be discarded; all others
  1460. will be kept.  vm-rfc934-digest-headers determines the order of
  1461. appearance in that case, with headers not matching any in the
  1462. vm-rfc934-digest-headers list appearing last in the headers
  1463. of the digestified messages.")
  1464.  
  1465. (defvar vm-rfc1153-digest-headers
  1466.   '("Resent-"
  1467.     "Date:"
  1468.     "From:" "Sender:"
  1469.     "To:" "Cc:"
  1470.     "Subject:"
  1471.     "Message-ID:"
  1472.     "Keywords:")
  1473.   "*List of headers that should be appear in RFC 1153 digests
  1474. created by VM.  These should be listed in the order you wish them
  1475. to appear in the digest.  Regular expressions are allowed.
  1476. There is no need to anchor patterns with \"^\", as searches always
  1477. start at the beginning of a line.  Put a colon at the end of
  1478. patterns to get exact matches.  (E.g. \"Date\" matches \"Date\"
  1479. and \"Date-Sent\".)  Header names are always matched case
  1480. insensitively.
  1481.  
  1482. If the value of vm-rfc1153-digest-discard-header-regexp is nil, the headers
  1483. matched by vm-rfc1153-digest-headers are the only headers that will be
  1484. kept.
  1485.  
  1486. If vm-rfc1153-digest-discard-header-regexp is non-nil, then only
  1487. headers matched by that variable will be discarded; all others
  1488. will be kept.  vm-rfc1153-digest-headers determines the order of
  1489. appearance in that case, with headers not matching any in the
  1490. vm-rfc1153-digest-headers list appearing last in the headers of
  1491. the digestified messages.")
  1492.  
  1493. (defvar vm-rfc1153-digest-discard-header-regexp "\\(X400-\\)?Received:"
  1494.   "*Non-nil value should be a regular expression header that tells
  1495. what headers should not appear in RFC 1153 digests created by VM.  This
  1496. variable along with vm-rfc1153-digest-headers determines which headers
  1497. are kept and which headers are discarded.
  1498.  
  1499. If the value of vm-rfc1153-digest-discard-header-regexp is nil, the headers
  1500. matched by vm-rfc1153-digest-headers are the only headers that will be
  1501. kept.
  1502.  
  1503. If vm-rfc1153-digest-discard-header-regexp is non-nil, then only
  1504. headers matched by this variable will be discarded; all others
  1505. will be kept.  vm-rfc1153-digest-headers determines the order of
  1506. appearance in that case, with headers not matching any in the
  1507. vm-rfc1153-digest-headers list appearing last in the headers of
  1508. the digestified messages.")
  1509.  
  1510. (defvar vm-mime-digest-headers
  1511.   '("Resent-"
  1512.     "From:" "Sender:"
  1513.     "To:" "Cc:"
  1514.     "Subject:"
  1515.     "Date:"
  1516.     "Message-ID:"
  1517.     "Keywords:"
  1518.     "MIME-Version:"
  1519.     "Content-")
  1520.   "*List of headers that should be appear in MIME digests
  1521. created by VM.  These should be listed in the order you wish them
  1522. to appear in the messages in the digest.  Regular expressions are
  1523. allowed.  There's no need to anchor patterns with \"^\", as
  1524. searches always start at the beginning of a line.  Put a colon at
  1525. the end of patterns to get exact matches.  (E.g. \"Date\" matches
  1526. \"Date\" and \"Date-Sent\".)  Header names are always matched
  1527. case insensitively.
  1528.  
  1529. If the value of vm-mime-digest-discard-header-regexp is nil, the headers
  1530. matched by vm-mime-digest-headers are the only headers that will be
  1531. kept.
  1532.  
  1533. If vm-mime-digest-discard-header-regexp is non-nil, then only
  1534. headers matched by that variable will be discarded; all others
  1535. will be kept.  vm-mime-digest-headers determines the order of
  1536. appearance in that case, with headers not matching any in the
  1537. vm-mime-digest-headers list appearing last in the headers
  1538. of the digestified messages.")
  1539.  
  1540. (defvar vm-mime-digest-discard-header-regexp nil
  1541.   "*Non-nil value should be a regular expression header that tells
  1542. which headers should not appear in MIME digests created
  1543. by VM.  This variable along with vm-mime-digest-headers
  1544. determines which headers are kept and which are discarded.
  1545.  
  1546. If the value of vm-mime-digest-discard-header-regexp is nil, the headers
  1547. matched by vm-mime-digest-headers are the only headers that will be
  1548. kept.
  1549.  
  1550. If vm-mime-digest-discard-header-regexp is non-nil, then only
  1551. headers matched by this variable will be discarded; all others
  1552. will be kept.  vm-mime-digest-headers determines the order of
  1553. appearance in that case, with headers not matching any in the
  1554. vm-mime-digest-headers list appearing last in the headers
  1555. of the digestified messages.")
  1556.  
  1557. (defvar vm-resend-bounced-headers
  1558.   '("MIME-Version:" "Content-"
  1559.     "From:" "Sender:" "Reply-To:"
  1560.     "To:" "Cc:"
  1561.     "Subject:"
  1562.     "Newsgroups:"
  1563.     "In-Reply-To:" "References:"
  1564.     "Keywords:"
  1565.     "X-")
  1566.   "*List of headers that should be appear in messages resent with
  1567. vm-resend-bounced-message.  These should be listed in the order you wish them
  1568. to appear in the message.  Regular expressions are allowed.
  1569. There is no need to anchor patterns with \"^\", as searches always
  1570. start at the beginning of a line.  Put a colon at the end of
  1571. patterns to get exact matches.  (E.g. \"Date\" matches \"Date\"
  1572. and \"Date-Sent\".)  Header names are always matched case
  1573. insensitively.
  1574.  
  1575. If the value of vm-resend-bounced-discard-header-regexp is nil, the headers
  1576. matched by vm-resend-bounced-headers are the only headers that will be
  1577. kept.
  1578.  
  1579. If vm-resend-bounced-discard-header-regexp is non-nil, then only
  1580. headers matched by that variable will be discarded; all others
  1581. will be kept.  vm-resend-bounced-headers determines the order of
  1582. appearance in that case, with headers not matching any in the
  1583. vm-resend-bounced-headers list appearing last in the headers of
  1584. the message.")
  1585.  
  1586. (defvar vm-resend-bounced-discard-header-regexp nil
  1587.   "*Non-nil value should be a regular expression that tells
  1588. what headers should not appear in a resent bounced message.  This
  1589. variable along with vm-resend-bounced-headers determines which headers
  1590. are kept and which headers are discarded.
  1591.  
  1592. If the value of vm-resend-bounced-discard-header-regexp is nil,
  1593. the headers matched by vm-resend-bounced-headers are the only
  1594. headers that will be kept.
  1595.  
  1596. If vm-resend-bounced-discard-header-regexp is non-nil, then only
  1597. headers matched by this variable will be discarded; all others
  1598. will be kept.  vm-resend-bounced-headers determines the order of
  1599. appearance in that case, with headers not matching any in the
  1600. vm-resend-bounced-headers list appearing last in the headers of
  1601. the message.")
  1602.  
  1603. (defvar vm-resend-headers nil
  1604.   "*List of headers that should be appear in messages resent with
  1605. vm-resend-message.  These should be listed in the order you wish them
  1606. to appear in the message.  Regular expressions are allowed.
  1607. There is no need to anchor patterns with \"^\", as searches always
  1608. start at the beginning of a line.  Put a colon at the end of
  1609. patterns to get exact matches.  (E.g. \"Date\" matches \"Date\"
  1610. and \"Date-Sent\".)  Header names are always matched case
  1611. insensitively.
  1612.  
  1613. If the value of vm-resend-discard-header-regexp is nil, the headers
  1614. matched by vm-resend-headers are the only headers that will be
  1615. kept.
  1616.  
  1617. If vm-resend-discard-header-regexp is non-nil, then only
  1618. headers matched by that variable will be discarded; all others
  1619. will be kept.  vm-resend-headers determines the order of
  1620. appearance in that case, with headers not matching any in the
  1621. vm-resend-headers list appearing last in the headers of
  1622. the message.")
  1623.  
  1624. (defvar vm-resend-discard-header-regexp "\\(\\(X400-\\)?Received:\\|Resent-\\)"
  1625.   "*Non-nil value should be a regular expression that tells
  1626. what headers should not appear in a resent message.  This
  1627. variable along with vm-resend-headers determines which
  1628. headers are kept and which headers are discarded.
  1629.  
  1630. If the value of vm-resend-discard-header-regexp is nil,
  1631. the headers matched by vm-resend-headers are the only
  1632. headers that will be kept.
  1633.  
  1634. If vm-resend-discard-header-regexp is non-nil, then only
  1635. headers matched by this variable will be discarded; all others
  1636. will be kept.  vm-resend-headers determines the order of
  1637. appearance in that case, with headers not matching any in the
  1638. vm-resend-headers list appearing last in the headers of
  1639. the message.")
  1640.  
  1641. (defvar vm-summary-format "%n %*%a %-17.17F %-3.3m %2d %4l/%-5c %I\"%s\"\n"
  1642.   "*String which specifies the message summary line format.
  1643. The string may contain the printf-like `%' conversion specifiers which
  1644. substitute information about the message into the final summary line.
  1645.  
  1646. Recognized specifiers are:
  1647.    a - attribute indicators (always four characters wide)
  1648.        The first char is  `D', `N', `U' or ` ' for deleted, new, unread
  1649.        and read messages respectively.
  1650.        The second char is `F', `W' or ` ' for filed (saved) or written
  1651.        messages.
  1652.        The third char is `R', `Z' or ` ' for messages replied to,
  1653.        and forwarded messages.
  1654.        The fourth char is `E' if the message has been edited, ` ' otherwise.
  1655.    A - longer version of attributes indicators (seven characters wide)
  1656.        The first char is  `D', `N', `U' or ` ' for deleted, new, unread
  1657.        and read messages respectively.
  1658.        The second is `r' or ` ', for message replied to.
  1659.        The third is `z' or ` ', for messages forwarded.
  1660.        The fourth is `b' or ` ', for messages redistributed.
  1661.        The fifth is `f' or ` ', for messages filed.
  1662.        The sixth is `w' or ` ', for messages written.
  1663.        The seventh is `e' or ` ', for messages that have been edited.
  1664.    c - number of characters in message (ignoring headers)
  1665.    d - numeric day of month message sent
  1666.    f - author's address
  1667.    F - author's full name (same as f if full name not found)
  1668.    h - hour:min:sec message sent
  1669.    H - hour:min message sent
  1670.    i - message ID
  1671.    I - thread indentation
  1672.    l - number of lines in message (ignoring headers)
  1673.    L - labels (as a comma list)
  1674.    m - month message sent
  1675.    M - numeric month message sent (January = 1)
  1676.    n - message number
  1677.    s - message subject
  1678.    t - addresses of the recipients of the message, in a comma-separated list
  1679.    T - full names of the recipients of the message, in a comma-separated list
  1680.        If a full name cannot be found, the corresponding address is used
  1681.        instead.
  1682.    U - user defined specifier.  The next character in the format
  1683.        string should be a letter.  VM will call the function
  1684.        vm-summary-function-<letter> (e.g. vm-summary-function-A for
  1685.        \"%UA\") in the folder buffer with the message being summarized
  1686.        bracketed by (point-min) and (point-max).  The function
  1687.        will be passed a message struct as an argument.
  1688.        The function should return a string, which VM will insert into
  1689.        the summary as it would for information from any other summary
  1690.        specifier.
  1691.    w - day of the week message sent
  1692.    y - year message sent
  1693.    z - timezone of date when the message was sent
  1694.    * - `*' if the message is marked, ` ' otherwise
  1695.  
  1696. Use %% to get a single %.
  1697.  
  1698. A numeric field width may be given between the `%' and the specifier;
  1699. this causes right justification of the substituted string.  A negative field
  1700. width causes left justification.
  1701.  
  1702. The field width may be followed by a `.' and a number specifying
  1703. the maximum allowed length of the substituted string.  If the
  1704. string is longer than this value the right end of the string is
  1705. truncated.  If the value is negative, the string is truncated on
  1706. the left instead of the right.
  1707.  
  1708. The summary format need not be one line per message but it must end with
  1709. a newline, otherwise the message pointer will not be displayed correctly
  1710. in the summary window.")
  1711.  
  1712. (defvar vm-summary-arrow "->"
  1713.   "*String that is displayed to the left of the summary of the
  1714. message VM consider to be the current message.  The value takes
  1715. effect when the summary buffer is created.  Changing this
  1716. variable's value has no effect on existing summary buffers.")
  1717.  
  1718. (defvar vm-summary-highlight-face 'bold
  1719.   "*Face to use to highlight the summary entry for the current message.
  1720. Nil means don't highlight the current message's summary entry.")
  1721.  
  1722. (defvar vm-mouse-track-summary t
  1723.   "*Non-nil value means highlight summary lines as the mouse passes
  1724. over them.")
  1725.  
  1726. (defvar vm-summary-show-threads nil
  1727.   "*Non-nil value means VM should display and maintain
  1728. message thread trees in the summary buffer.  This means that
  1729. messages with a common ancestor will be displayed contiguously in
  1730. the summary.  (If you have vm-move-messages-physically set
  1731. non-nil the folder itself will be reordered to match the thread
  1732. ordering.)  If you use the `%I' summary format specifier in your
  1733. vm-summary-format, indentation will be provided as described in the
  1734. documentation for vm-summary-thread-indent-level (which see).
  1735.  
  1736. A nil value means don't display thread information.  The `%I'
  1737. specifier does nothing in the summary format.
  1738.  
  1739. This variable automatically becomes buffer-local when set in any
  1740. fashion.  You should set this variable only in your .vm or .emacs
  1741. file.  Use setq-default.  Once VM has been started, you should not
  1742. set this variable directly, rather you should use the command
  1743. vm-toggle-threads-display, normally bound to C-t.")
  1744. (make-variable-buffer-local 'vm-summary-show-threads)
  1745.  
  1746. (defvar vm-summary-thread-indent-level 2
  1747.   "*Value should be a number that specifies how much
  1748. indentation the '%I' summary format specifier should provide per
  1749. thread level.  A message's `thread level' refers to the number of
  1750. direct ancestors from the message to the oldest ancestor the
  1751. message has that is in the current folder.  For example, the
  1752. first message of a thread is generally a message about a new
  1753. topic, e.g. a message that is not a reply to some other message.
  1754. Therefore it has no ancestor and would cause %I to generate no
  1755. indentation.  A reply to this message will be indented by the value
  1756. of vm-summary-thread-indent-level.  A reply to that reply will be
  1757. indented twice the value of vm-summary-thread-indent-level.")
  1758.  
  1759. (defvar vm-thread-using-subject t
  1760.   "*Non-nil value causes VM to use the Subject header to thread messages.
  1761. Messages with the same subject will be grouped together.
  1762.  
  1763. A nil value means VM will disregard the Subject header when
  1764. threading messages.")
  1765.  
  1766. (defvar vm-summary-uninteresting-senders nil
  1767.   "*Non-nil value should be a regular expression that matches
  1768. addresses that you don't consider interesting enough to
  1769. appear in the summary.  When such senders would be displayed by
  1770. the %F or %f summary format specifiers VM will substitute the
  1771. value of vm-summary-uninteresting-senders-arrow (default \"To:
  1772. \") followed by what would be shown by the %T and %t specifiers
  1773. respectively.")
  1774.  
  1775. (defvar vm-summary-uninteresting-senders-arrow "To: "
  1776.   "*String to display before the string that is displayed instead of an
  1777. \"uninteresting\" sender.  See vm-summary-uninteresting-senders.")
  1778.  
  1779. (defvar vm-auto-center-summary nil
  1780.   "*Value controls whether VM will keep the summary arrow vertically
  1781. centered within the summary window. A value of t causes VM to always
  1782. keep arrow centered.  A value of nil means VM will never bother centering
  1783. the arrow.  A value that is not nil and not t causes VM to center the
  1784. arrow only if the summary window is not the only existing window.")
  1785.  
  1786. (defvar vm-subject-ignored-prefix "^\\(re: *\\)+"
  1787.   "*Non-nil value should be a regular expression that matches
  1788. strings at the beginning of the Subject header that you want VM to ignore
  1789. when threading, sorting, marking, and killing messages by subject.
  1790.  
  1791. Matches are done case-insensitively.")
  1792.  
  1793. (defvar vm-subject-ignored-suffix "\\( (fwd)\\| \\)+$"
  1794.   "*Non-nil value should be a regular expression that matches
  1795. strings at the end of the Subject header that you want VM to ignore
  1796. when threading, sorting, marking and killing messages by subject.
  1797.  
  1798. Matches are done case-insensitively.")
  1799.  
  1800. (defvar vm-mutable-windows pop-up-windows
  1801.   "*This variable's value controls VM's window usage.
  1802.  
  1803. A non-nil value gives VM free run of the Emacs display; it will commandeer
  1804. the entire screen for its purposes.
  1805.  
  1806. A value of nil restricts VM's window usage to the window from which
  1807. it was invoked.  VM will not create, delete, or use any other windows,
  1808. nor will it resize its own window.")
  1809.  
  1810. (defvar vm-mutable-frames t
  1811.   "*Non-nil value means VM is allowed to create and destroy frames
  1812. to display and undisplay buffers.  Whether VM actually does
  1813. so depends on the value of the variables with names prefixed by
  1814. `vm-frame-per-'.
  1815.  
  1816. VM can create a frame to display a buffer, and delete frame to
  1817. undisplay a buffer.  A nil value means VM should not create or
  1818. delete frames.
  1819.  
  1820. This variable used to have a different meaning but it was changed
  1821. to better reflect what users expected.  This variable is now a
  1822. frame analogue of vm-mutable-windows.
  1823.  
  1824. This variable does not apply to the VM commands whose
  1825. names end in -other-frame, which always create a new frame.")
  1826.  
  1827. (defvar vm-raise-frame-at-startup t
  1828.   "*Specifies whether VM should raise its frame at startup.
  1829. A value of nil means never raise the frame.
  1830. A value of t means always raise the frame.
  1831. Other values are reserved for future use.")
  1832.  
  1833. (defvar vm-frame-per-folder t
  1834.   "*Non-nil value causes the folder visiting commands to visit in a new frame.
  1835. Nil means the commands will use the current frame.  This variable
  1836. does not apply to the VM commands whose names end in
  1837. -other-frame, which always create a new frame.
  1838.  
  1839. This variable has no meaning if you're not running under an Emacs
  1840. capable of displaying multiple real or virtual frames.  Note that
  1841. Emacs supports multiple virtual frames on dumb terminals, and
  1842. VM will use them.")
  1843.  
  1844. (defvar vm-frame-per-summary nil
  1845.   "*Non-nil value causes VM to display the folder summary in its own frame.
  1846. Nil means the vm-summarize command will use the current frame.
  1847. This variable does not apply to vm-summarize-other-frame, which
  1848. always create a new frame.
  1849.  
  1850. This variable has no meaning if you're not running under an Emacs
  1851. capable of displaying multiple real or virtual frames.  Note that
  1852. Emacs supports multiple virtual frames on dumb terminals, and
  1853. VM will use them.")
  1854.  
  1855. (defvar vm-frame-per-composition t
  1856.   "*Non-nil value causes the mail composition commands to open a new frame.
  1857. Nil means the commands will use the current frame.  This variable
  1858. does not apply to the VM commands whose names end in
  1859. -other-frame, which always create a new frame.
  1860.  
  1861. This variable has no meaning if you're not running under an Emacs
  1862. capable of displaying multiple real or virtual frames.  Note that
  1863. Emacs supports multiple virtual frames on dumb terminals, and
  1864. VM will use them.")
  1865.  
  1866. (defvar vm-frame-per-edit t
  1867.   "*Non-nil value causes vm-edit-message to open a new frame.
  1868. Nil means the vm-edit-message will use the current frame.  This
  1869. variable does not apply to vm-edit-message-other-frame, which
  1870. always create a new frame.
  1871.  
  1872. This variable has no meaning if you're not running under an Emacs
  1873. capable of displaying multiple real or virtual frames.  Note that
  1874. Emacs support multiple virtual frames on dumb terminals, and
  1875. VM will use them.")
  1876.  
  1877. (defvar vm-frame-per-help nil
  1878.   "*Non-nil value causes VM to open a new frame to display help buffers.
  1879. Nil means the VM will use the current frame.
  1880.  
  1881. This variable has no meaning if you're not running under an Emacs
  1882. capable of displaying multiple real or virtual frames.  Note that
  1883. Emacs supports multiple virtual frames on dumb terminals, and
  1884. VM will use them.")
  1885.  
  1886. (defvar vm-frame-per-completion t
  1887.   "*Non-nil value causes VM to open a new frame on mouse
  1888. initiated completing reads.  A mouse initiated completing read
  1889. occurs when you invoke a VM command using the mouse, either with a
  1890. menu or a toolbar button.  That command must then prompt you for
  1891. information, and there must be a limited set of proper responses.
  1892.  
  1893. If these conditions are met and vm-frame-per-completion's value
  1894. is non-nil, VM will create a new frame containing a list of
  1895. responses that you can select with the mouse.
  1896.  
  1897. A nil value means the current frame will be used to display the
  1898. list of choices.
  1899.  
  1900. This variable has no meaning if you're not running Emacs native
  1901. under X Windows or some other window system that allows multiple
  1902. real Emacs frames.  Note that Emacs supports virtual frames under
  1903. ttys but VM will not use these to display completion information.")
  1904.  
  1905. (defvar vm-frame-parameter-alist nil
  1906.   "*Non-nil value is an alist of types and lists of frame parameters.
  1907. This list tells VM what frame parameters to associate with each
  1908. new frame it creates of a specific type.
  1909.  
  1910. The alist should be of this form
  1911.  
  1912.   ((SYMBOL PARAMLIST) (SYMBOL2 PARAMLIST2) ...)
  1913.  
  1914. SYMBOL must be one of `completion', `composition', `edit',
  1915. `folder', `primary-folder' or `summary'.  It specifies the type
  1916. of frame that the following PARAMLIST applies to.
  1917.  
  1918. `completion' specifies parameters for frames that display list of
  1919.    choices generated by a mouse-initiated completing read.
  1920.    (See vm-frame-per-completion.)
  1921. `composition' specifies parameters for mail composition frames.
  1922. `edit' specifies parameters for message edit frames
  1923.    (e.g. created by vm-edit-message-other-frame)
  1924. `folder' specifies parameters for frames created by `vm' and the
  1925.    `vm-visit-' commands.
  1926. `primary-folder' specifies parameters for the frame created by running
  1927.    `vm' without any arguments.
  1928. `summary' specifies parameters for frames that display a summary buffer
  1929.    (e.g. created by vm-summarize-other-frame)
  1930.  
  1931. PARAMLIST is a list of pairs as described in the documentation for
  1932. the function `make-frame'.")
  1933.  
  1934. (defvar vm-search-other-frames t
  1935.   "*Non-nil means VM should search frames other than the selected frame
  1936. when looking for a window that is already displaying a buffer that
  1937. VM wants to display or undisplay.")
  1938.  
  1939. (defvar vm-image-directory
  1940.   (if (fboundp 'locate-data-directory)
  1941.       (locate-data-directory "vm")
  1942.     (expand-file-name (concat data-directory "vm/")))
  1943.   "*Value specifies the directory VM should find its artwork.")
  1944.  
  1945. (defvar vm-use-toolbar
  1946.   '(next previous delete/undelete autofile file
  1947.     reply compose print visit quit nil help)
  1948.   "*Non-nil value causes VM to provide a toolbar interface.
  1949. Value should be a list of symbols and integers that will determine which
  1950. toolbar buttons will appear and in what order.  Valid symbol
  1951. value within the list are:
  1952.  
  1953.     autofile
  1954.     compose
  1955.     delete/undelete
  1956.     file
  1957.     getmail
  1958.     help
  1959.     mime
  1960.     next
  1961.     previous
  1962.     print
  1963.     quit
  1964.     reply
  1965.     visit
  1966.     nil
  1967.  
  1968. If nil appears in the list, it should appear exactly once.  All
  1969. buttons after nil in the list will be displayed flushright in
  1970. top/bottom toolbars and flushbottom in left/right toolbars.
  1971.  
  1972. If a positive integer N appears in the list, a blank space will
  1973. appear in the toolbar with a width of N pixels for top/bottom
  1974. toolbars, and a height of N for left/right toolbars.
  1975.  
  1976. This variable only has meaning under XEmacs 19.12 and beyond.
  1977. See also vm-toolbar-orientation to control where the toolbar is placed.")
  1978.  
  1979. (defvar vm-toolbar-orientation 'left
  1980.   "*Value is a symbol that specifies where the VM toolbar is located.
  1981. Legal values are `left', `right' `top' and `bottom'.  Any other
  1982. value will be interpreted as `top'.
  1983.  
  1984. This variable only has meaning under XEmacs 19.12 and beyond.")
  1985.  
  1986. (defvar vm-toolbar-pixmap-directory vm-image-directory
  1987.   "*Value specifies the directory VM should find its toolbar pixmaps.")
  1988.  
  1989. (defvar vm-toolbar nil
  1990.   "*Non-nil value should be a list of toolbar button descriptors.
  1991. See the documentation for the variable default-toolbar for a
  1992. definition of what a toolbar button descriptor is.
  1993.  
  1994. If vm-toolbar is set non-nil VM will use its value as a toolbar
  1995. instantiator instead of the usual behavior of building a button
  1996. list based on the value of vm-use-toolbar.  vm-use-toolbar still
  1997. must be set non-nil for a toolbar to appear, however.
  1998.  
  1999. Consider this variable experimental; it may not be supported forever.")
  2000.  
  2001. (defvar vm-use-menus 
  2002.   (nconc (list 'folder 'motion 'send 'mark 'label 'sort 'virtual)
  2003.      (cond ((string-match ".*-.*-\\(win95\\|nt\\)" system-configuration)
  2004.         nil)
  2005.            (t (list 'undo)))
  2006.      (list 'dispose)
  2007.      (cond ((string-match ".*-.*-\\(win95\\|nt\\)" system-configuration)
  2008.         nil)
  2009.            (t (list 'emacs)))
  2010.      (list nil 'help))
  2011.   "*Non-nil value causes VM to provide a menu interface.
  2012. A value that is a list causes VM to install its own menubar.
  2013. A value of 1 causes VM to install a \"VM\" item in the Emacs menubar.
  2014.  
  2015. If the value of vm-use-menus is a list, it should be a list of
  2016. symbols.  The symbols and the order that they are listed
  2017. determine what menus will be in the menubar and how they are
  2018. ordered.  Valid symbols values are:
  2019.  
  2020.     dispose
  2021.     emacs
  2022.     folder
  2023.     help
  2024.     label
  2025.     mark
  2026.     motion
  2027.     send
  2028.     sort
  2029.     undo
  2030.     virtual
  2031.     nil
  2032.  
  2033. If nil appears in the list, it should appear exactly once.  All
  2034. menus after nil in the list will be displayed flushright in
  2035. menubar.
  2036.  
  2037. This variable only has meaning in Emacs environments where menus
  2038. are provided, which usually means Emacs has to be running under a
  2039. window system.")
  2040.  
  2041. (defvar vm-popup-menu-on-mouse-3 t
  2042.   "*Non-nil value means VM should provide context-sensitive menus on mouse-3.
  2043. A nil value means VM should not change the binding of mouse-3.")
  2044.  
  2045. (defvar vm-warp-mouse-to-new-frame nil
  2046.   "*Non-nil value causes VM to move the mouse cursor into newly created frames.
  2047. This is useful to give the new frame the focus under some window managers
  2048. that randomly place newly created frames.
  2049.  
  2050. Nil means don't move the mouse cursor.")
  2051.  
  2052. (defvar vm-url-browser
  2053.   (cond ((fboundp 'w3-fetch-other-frame)
  2054.      'w3-fetch-other-frame)
  2055.     ((fboundp 'w3-fetch)
  2056.      'w3-fetch)
  2057.     (t 'vm-mouse-send-url-to-netscape))
  2058.   "*Non-nil value means VM should enable URL passing.
  2059. This means that VM will search for URLs (Uniform Resource
  2060. Locators) in messages and make it possible for you to pass them
  2061. to a World Wide Web browser.
  2062.  
  2063. Clicking mouse-2 on the URL will send it to the browser.
  2064.  
  2065. By default clicking mouse-3 on the URL will pop up a menu of
  2066. browsers and you can pick which one you want to use.  If
  2067. vm-popup-menu-on-mouse-3 is set to nil, you will not see the menu.
  2068.  
  2069. Moving point to a character within the URL and pressing RETURN
  2070. will send the URL to the browser.
  2071.  
  2072. If the value of vm-url-browser is a string, it should specify
  2073. name of an external browser to run.  The URL will be passed to
  2074. the program as its first argument.
  2075.  
  2076. If the value of vm-url-browser is a symbol, it should specify a
  2077. Lisp function to call.  The URL will be passed to the program as
  2078. its first and only argument.  Use
  2079.  
  2080.    (setq vm-url-browser 'vm-mouse-send-url-to-netscape)
  2081.  
  2082. for Netscape, and
  2083.  
  2084.    (setq vm-url-browser 'vm-mouse-send-url-to-mosaic)
  2085.  
  2086. for Mosaic.  The advantage of using them is that they will display
  2087. an URL using on existing Mosaic or Netscape process, if possible.
  2088.  
  2089. A nil value means VM should not enable URL passing to browsers.")
  2090.  
  2091. (defvar vm-highlight-url-face 'bold-italic
  2092.   "*Non-nil value should be a face to use display URLs found in messages.
  2093. Nil means don't highlight URLs.")
  2094.  
  2095. (defvar vm-url-search-limit 12000
  2096.   "*Non-nil numeric value tells VM how hard to search for URLs.
  2097. The number specifies the maximum message size in characters that
  2098. VM will search for URLs.  For message larger than this value, VM
  2099. will search from the beginning of the mssage to a point
  2100. vm-url-search-limit / 2 characters into the message.  Then VM will
  2101. search from a point vm-url-search-limit / 2 characters from the
  2102. end of the message to the end of message.")
  2103.  
  2104. (defvar vm-display-xfaces nil
  2105.   "*Non-nil means display images as specifies in X-Face headers.
  2106. This requires at least XEmacs 19.12 with native xface support compiled in.")
  2107.  
  2108. (defvar vm-startup-with-summary t
  2109.   "*Value tells VM whether to generate a summary when a folder is visited.
  2110. Nil means don't automatically generate a summary.
  2111.  
  2112. A value of t means always generate a summary.
  2113.  
  2114. A positive numeric value N means only generate a summary if there
  2115. are N or more messages.
  2116.  
  2117. A negative numeric value -N means only generate a summary if
  2118. there are N or less messages.")
  2119.  
  2120. (defvar vm-follow-summary-cursor t
  2121.   "*Non-nil value causes VM to select the message under the cursor in the
  2122. summary window before executing commands that operate on the current message.
  2123. This occurs only when the summary buffer window is the selected window.")
  2124.  
  2125. (defvar vm-jump-to-new-messages t
  2126.   "*Non-nil value causes VM to jump to the first new message
  2127. whenever such messages arrive in a folder or the first time a
  2128. folder is visited.
  2129.  
  2130. See also vm-jump-to-unread-messages.")
  2131.  
  2132. (defvar vm-jump-to-unread-messages t
  2133.   "*Non-nil value causes VM to jump to the first unread message
  2134. whenever such messages arrive in a folder or the first time a
  2135. folder is visited.  New messages are considered unread in this
  2136. context so new messages will be jumped to as well.
  2137.  
  2138. The value of vm-jump-to-new-messages takes precedence over the
  2139. setting of this variable.  So if there are unread messages and
  2140. new messages VM will jump to the first new message, even if an
  2141. unread message appears before it in the folder, provided
  2142. vm-jump-to-new-messages is non-nil.")
  2143.  
  2144. (defvar vm-skip-deleted-messages t
  2145.   "*Non-nil value causes VM's `n' and 'p' commands to skip over
  2146. deleted messages.  A value of t causes deleted messages to always be skipped.
  2147. A value that is not nil and not t causes deleted messages to be skipped only
  2148. if there are other messages that are not flagged for deletion in the desired
  2149. direction of motion.")
  2150.  
  2151. (defvar vm-skip-read-messages nil
  2152.   "*Non-nil value causes VM's `n' and `p' commands to skip over
  2153. messages that have already been read, in favor of new or unread messages.
  2154. A value of t causes read messages to always be skipped.  A value that is
  2155. not nil and not t causes read messages to be skipped only if there are
  2156. unread messages in the desired direction of motion.")
  2157.  
  2158. (defvar vm-move-after-deleting nil
  2159.   "*Non-nil value causes VM's `d' command to automatically invoke
  2160. vm-next-message or vm-previous-message after deleting, to move
  2161. past the deleted messages.  A value of t means motion should
  2162. honor the value of vm-circular-folders.  A value that is not t
  2163. and not nil means that motion should be done as if
  2164. vm-circular-folders is set to nil.")
  2165.  
  2166. (defvar vm-move-after-undeleting nil
  2167.   "*Non-nil value causes VM's `u' command to automatically invoke
  2168. vm-next-message or vm-previous-message after undeleting, to move
  2169. past the undeleted messages.  A value of t means motion should
  2170. honor the value of vm-circular-folders.  A value that is not t
  2171. and not nil means that motion should be done as if
  2172. vm-circular-folders is set to nil.")
  2173.  
  2174. (defvar vm-move-after-killing nil
  2175.   "*Non-nil value causes VM's `k' command to automatically invoke
  2176. vm-next-message or vm-previous-message after killing messages, to try
  2177. to move past the deleted messages.  A value of t means motion
  2178. should honor the value of vm-circular-folders.  A value that is
  2179. not t and not nil means that motion should be done as if
  2180. vm-circular-folders is set to nil.")
  2181.  
  2182. (defvar vm-delete-after-saving nil
  2183.   "*Non-nil value causes VM automatically to mark messages for deletion
  2184. after successfully saving them to a folder.")
  2185.  
  2186. (defvar vm-delete-after-archiving nil
  2187.   "*Non-nil value causes VM automatically to mark messages for deletion
  2188. after successfully auto-archiving them with the vm-auto-archive-messages
  2189. command.")
  2190.  
  2191. (defvar vm-delete-after-bursting nil
  2192.   "*Non-nil value causes VM automatically to mark a message for deletion
  2193. after it has been successfully burst by the vm-burst-digest command.")
  2194.  
  2195. (defvar vm-circular-folders nil
  2196.   "*Value determines whether VM folders will be considered circular by
  2197. various commands.  `Circular' means VM will wrap from the end of the folder
  2198. to the start and vice versa when moving the message pointer, or deleting,
  2199. undeleting or saving messages before or after the current message.
  2200.  
  2201. A value of t causes all VM commands to consider folders circular.
  2202.  
  2203. A value of nil causes all of VM commands to signal an error if the start
  2204. or end of the folder would have to be passed to complete the command.
  2205. For movement commands, this occurs after the message pointer has been
  2206. moved as far as possible in the specified direction.  For other commands,
  2207. the error occurs before any part of the command has been executed, i.e.
  2208. no deletions, saves, etc. will be done unless they can be done in their
  2209. entirety.
  2210.  
  2211. A value that is not nil and not t causes only VM's movement commands to
  2212. consider folders circular.  Saves, deletes and undelete commands will
  2213. behave the same as if the value is nil.")
  2214.  
  2215. (defvar vm-search-using-regexps nil
  2216.   "*Non-nil value causes VM's search command to interpret user input as a
  2217. regular expression instead of as a literal string.")
  2218.  
  2219. (defvar vm-move-messages-physically nil
  2220.   "*Non-nil value causes VM's commands that change the message order
  2221. of a folder to always move the physical messages involved and not
  2222. just change the presentation order.  Nil means that commands just
  2223. change the order in which VM displays messages and leave the
  2224. folder itself undisturbed.")
  2225.  
  2226. (defvar vm-edit-message-mode 'text-mode
  2227.   "*Major mode to use when editing messages in VM.")
  2228.  
  2229. (defvar vm-print-command (if (boundp 'lpr-command) lpr-command "lpr")
  2230.   "*Command VM uses to print messages.")
  2231.  
  2232. (defvar vm-print-command-switches (if (boundp 'lpr-switches) lpr-switches nil)
  2233.   "*List of command line flags passed to the command named by vm-print-command.
  2234. VM uses vm-print-command to print messages.")
  2235.  
  2236. (defvar vm-berkeley-mail-compatibility
  2237.   (memq system-type '(berkeley-unix netbsd))
  2238.   "*Non-nil means to read and write BSD Mail(1) style Status: headers.
  2239. This makes sense if you plan to use VM to read mail archives created by
  2240. Mail.")
  2241.  
  2242. (defvar vm-strip-reply-headers nil
  2243.   "*Non-nil value causes VM to strip away all comments and extraneous text
  2244. from the headers generated in reply messages.  If you use the \"fakemail\"
  2245. program as distributed with Emacs, you probably want to set this variable
  2246. to t, because as of Emacs v18.52 \"fakemail\" could not handle unstripped
  2247. headers.")
  2248.  
  2249. (defvar vm-select-new-message-hook nil
  2250.   "*List of hook functions called every time a message with the 'new'
  2251. attribute is made to be the current message.  When the hooks are run the
  2252. current buffer will be the folder containing the message and the
  2253. start and end of the message will be bracketed by (point-min) and
  2254. (point-max).")
  2255.  
  2256. (defvar vm-select-unread-message-hook nil
  2257.   "*List of hook functions called every time a message with the 'unread'
  2258. attribute is made to be the current message.  When the hooks are run the
  2259. current buffer will be the folder containing the message and the
  2260. start and end of the message will be bracketed by (point-min) and
  2261. (point-max).")
  2262.  
  2263. (defvar vm-select-message-hook nil
  2264.   "*List of hook functions called every time a message
  2265. is made to be the current message.  When the hooks are run the
  2266. current buffer will be the folder containing the message and the
  2267. start and end of the message will be bracketed by (point-min) and
  2268. (point-max).")
  2269.  
  2270. (defvar vm-arrived-message-hook nil
  2271.   "*List of hook functions called once for each message gathered from
  2272. the system mail spool, or from another folder with
  2273. vm-get-new-mail, or from a digest with vm-burst-digest.  When the
  2274. hooks are run the current buffer will be the folder containing
  2275. the message and the start and end of the message will be
  2276. bracketed by (point-min) and (point-max).")
  2277.  
  2278. (defvar vm-arrived-messages-hook nil
  2279.   "*List of hook functions called after VM has gathered a group of
  2280. messages from the system mail spool, or from another folder with
  2281. vm-get-new-mail, or from a digest with vm-burst-digest.  When the
  2282. hooks are run, the new messages will have already been added to
  2283. the message list but may not yet appear in the summary.  When the
  2284. hooks are run the current buffer will be the folder containing
  2285. the messages.")
  2286.  
  2287. (defvar vm-reply-hook nil
  2288.   "*List of hook functions to be run after a Mail mode
  2289. composition buffer has been created for a reply.  VM runs this
  2290. hook and then runs vm-mail-mode-hook before leaving the user in
  2291. the Mail mode buffer.")
  2292.  
  2293. (defvar vm-forward-message-hook nil
  2294.   "*List of hook functions to be run after a Mail mode
  2295. composition buffer has been created to forward a message.  VM
  2296. runs this hook and then runs vm-mail-mode-hook before leaving the
  2297. user in the Mail mode buffer.")
  2298.  
  2299. (defvar vm-resend-bounced-message-hook nil
  2300.   "*List of hook functions to be run after a Mail mode
  2301. composition buffer has been created to resend a bounced message.
  2302. VM runs this hook and then runs vm-mail-mode-hook before leaving
  2303. the user in the Mail mode buffer.")
  2304.  
  2305. (defvar vm-resend-message-hook nil
  2306.   "*List of hook functions to be run after a Mail mode
  2307. composition buffer has been created to resend a message.
  2308. VM runs this hook and then runs vm-mail-mode-hook before leaving
  2309. the user in the Mail mode buffer.")
  2310.  
  2311. (defvar vm-send-digest-hook nil
  2312.   "*List of hook functions to be run after a Mail mode
  2313. composition buffer has been created to send a digest.
  2314. VM runs this hook and then runs vm-mail-mode-hook before leaving
  2315. the user in the Mail mode buffer.")
  2316.  
  2317. (defvar vm-mail-hook nil
  2318.   "*List of hook functions to be run after a Mail mode
  2319. composition buffer has been created to send a non specialized
  2320. message, i.e. a message that is not a reply, forward, digest,
  2321. etc.  VM runs this hook and then runs vm-mail-mode-hook before
  2322. leaving the user in the Mail mode buffer.")
  2323.  
  2324. (defvar vm-summary-update-hook nil
  2325.   "*List of hook functions called just after VM updates an existing
  2326. entry a folder summary.")
  2327.  
  2328. (defvar vm-summary-redo-hook nil
  2329.   "*List of hook functions called just after VM adds or deletes
  2330. entries from a folder summary.")
  2331.  
  2332. (defvar vm-visit-folder-hook nil
  2333.   "*List of hook functions called just after VM visits a folder.
  2334. It doesn't matter if the folder buffer already exists, this hook
  2335. is run each time vm or vm-visit-folder is called interactively.
  2336. It is NOT run after vm-mode is called.")
  2337.  
  2338. (defvar vm-retrieved-spooled-mail-hook nil
  2339.   "*List of hook functions called just after VM has retrieved
  2340. a group of messages from your system mailbox(es).  When these
  2341. hooks are run, the messages have been added to the folder buffer
  2342. but not the message list or summary.  When the hooks are run, the
  2343. current buffer will be the folder where the messages were
  2344. incorporated.")
  2345.  
  2346. (defvar vm-edit-message-hook nil
  2347.   "*List of hook functions to be run just before a message is edited.
  2348. This is the last thing vm-edit-message does before leaving the user
  2349. in the edit buffer.")
  2350.  
  2351. (defvar vm-mail-mode-hook nil
  2352.   "*List of hook functions to be run after a Mail mode
  2353. composition buffer has been created.  This is the last thing VM
  2354. does before leaving the user in the Mail mode buffer.")
  2355.  
  2356. (defvar vm-mode-hook nil
  2357.   "*List of hook functions to run when a buffer enters vm-mode.
  2358. These hook functions should generally be used to set key bindings
  2359. and local variables.")
  2360.  
  2361. (defvar vm-mode-hooks nil
  2362.   "*Old name for vm-mode-hook.
  2363. Supported for backward compatibility.
  2364. You should use the new name.")
  2365.  
  2366. (defvar vm-summary-mode-hook nil
  2367.   "*List of hook functions to run when a VM summary buffer is created.
  2368. The current buffer will be that buffer when the hooks are run.")
  2369.  
  2370. (defvar vm-summary-mode-hooks nil
  2371.   "*Old name for vm-summary-mode-hook.
  2372. Supported for backward compatibility.
  2373. You should use the new name.")
  2374.  
  2375. (defvar vm-virtual-mode-hook nil
  2376.   "*List of hook functions to run when a VM virtual folder buffer is created.
  2377. The current buffer will be that buffer when the hooks are run.")
  2378.  
  2379. (defvar vm-presentation-mode-hook nil
  2380.   "*List of hook functions to run when a VM presentation buffer is created.
  2381. The current buffer will be that buffer when the hooks are run.
  2382. Presentation buffers are used to display messages when some type of decoding
  2383. must be done to the message to make it presentable.  E.g. MIME decoding.")
  2384.  
  2385. (defvar vm-quit-hook nil
  2386.   "*List of hook functions to run when you quit VM.
  2387. This applies to any VM quit command.")
  2388.  
  2389. (defvar vm-summary-pointer-update-hook nil
  2390.   "*List of hook functions to run when VM summary pointer is updated.
  2391. When the hooks are run, the current buffer will be the summary buffer.")
  2392.  
  2393. (defvar vm-display-buffer-hook nil
  2394.   "*List of hook functions that are run every time VM wants to
  2395. display a buffer.  When the hooks are run the current buffer will
  2396. be the buffer that VM wants to display.  The hooks are expected
  2397. to select a window and VM will display the buffer in that
  2398. window.
  2399.  
  2400. If you use display hooks, you should not use VM's builtin window
  2401. configuration system as the result is likely to be confusing.")
  2402.  
  2403. (defvar vm-undisplay-buffer-hook nil
  2404.   "*List of hook functions that are run every time VM wants to
  2405. remove a buffer from the display.  When the hooks are run the
  2406. current buffer will be the buffer that VM wants to disappear.
  2407. The hooks are expected to do the work of removing the buffer from
  2408. the display.  The hook functions should not kill the buffer.
  2409.  
  2410. If you use undisplay hooks, you should not use VM's builtin
  2411. window configuration system as the result is likely to be
  2412. confusing.")
  2413.  
  2414. (defvar vm-iconify-frame-hook nil
  2415.   "*List of hook functions that are run whenever VM iconifies a frame.")
  2416.  
  2417. (defvar vm-menu-setup-hook nil
  2418.   "*List of hook functions that are run just after all menus are initialized.")
  2419.  
  2420. (defvar vm-mime-display-function nil
  2421.   "*If non-nil, this should name a function to be called inside 
  2422. vm-decode-mime-message to do the MIME display the current
  2423. message.  The function is called with no arguments, and at the
  2424. time of the call the current buffer will be the `presentation'
  2425. buffer for the folder, which is a temporary buffer that VM uses
  2426. for the display of MIME messages.  A copy of the current message
  2427. will be in the presentation buffer at that time.  The normal work
  2428. that vm-decode-mime-message would do is not done, because this
  2429. function is expected to subsume all of it.")
  2430.  
  2431. (defvar mail-yank-hooks nil
  2432.   "Hooks called after a message is yanked into a mail composition.
  2433.  
  2434. (This hook is deprecated, you should use mail-citation-hook instead.)
  2435.  
  2436. Value is a list of functions to be run.
  2437. Each hook function can find the newly yanked message between point and mark.
  2438. Each hook function should return with point and mark around the yanked message.
  2439.  
  2440. See the documentation for vm-yank-message to see when VM will run
  2441. these hooks.")
  2442.  
  2443. (defvar mail-citation-hook nil
  2444.   "*Hook for modifying a citation just inserted in the mail buffer.
  2445. Each hook function can find the citation between (point) and (mark t).
  2446. And each hook function should leave point and mark around the citation
  2447. text as modified.
  2448.  
  2449. If this hook is entirely empty (nil), a default action is taken
  2450. instead of no action.")
  2451.  
  2452. (defvar mail-default-headers nil
  2453.   "*A string containing header lines, to be inserted in outgoing messages.
  2454. It is inserted before you edit the message,
  2455. so you can edit or delete these lines.")
  2456.  
  2457. (defvar mail-signature nil
  2458.   "*Text inserted at end of mail buffer when a message is initialized.
  2459. If t, it means to insert the contents of the file `~/.signature'.")
  2460.  
  2461. (defvar vm-rename-current-buffer-function nil
  2462.   "*Non-nil value should be a function to call to rename a buffer.
  2463. Value should be something that can be passed to `funcall'.  If
  2464. this variable is non-nil, VM will use this function instead of
  2465. its own buffer renaming code.  The buffer to be renamed will be
  2466. the current buffer when the function is called.")
  2467.  
  2468. (defvar mode-popup-menu nil
  2469.   "The mode-specific popup menu.  Automatically buffer local.
  2470. By default, when you press mouse-3 in VM, this menu is popped up.")
  2471. (make-variable-buffer-local 'mode-popup-menu)
  2472.  
  2473. (defvar vm-movemail-program "movemail"
  2474.   "*Name of program to use to move mail from the system spool
  2475. to another location.  Normally this should be the movemail program
  2476. distributed with Emacs.")
  2477.  
  2478. (defvar vm-netscape-program "netscape"
  2479.   "*Name of program to use to run Netscape.
  2480. vm-mouse-send-url-to-netscape uses this.")
  2481.  
  2482. (defvar vm-netscape-program-switches nil
  2483.   "*List of command line switches to pass to Netscape.")
  2484.  
  2485. (defvar vm-mosaic-program "Mosaic"
  2486.   "*Name of program to use to run Mosaic.
  2487. vm-mouse-send-url-to-mosaic uses this.")
  2488.  
  2489. (defvar vm-mosaic-program-switches nil
  2490.   "*List of command line switches to pass to Mosaic.")
  2491.  
  2492. (defvar vm-temp-file-directory
  2493.   (or (getenv "TMPDIR")
  2494.       (and (file-directory-p "/tmp") "/tmp")
  2495.       (and (file-directory-p "C:\\") "C:\\")
  2496.       "/tmp")
  2497.   "*Name of a directory where VM can put temporary files.")
  2498.  
  2499. (defvar vm-tale-is-an-idiot nil
  2500.   "*Non-nil value causes vm-mail-send to check multi-line recipient
  2501. headers of outbound mail for lines that don't end with a
  2502. comma.  If such a line is found, an error is signaled and the
  2503. mail is not sent.")
  2504.  
  2505. (defvar vm-maintainer-address "bug-vm@uunet.uu.net"
  2506.   "Where to send VM bug reports.")
  2507.  
  2508. (defvar vm-mode-map
  2509.   (let ((map (make-sparse-keymap)))
  2510. ;; unneeded now that VM buffers all have buffer-read-only == t.
  2511. ;;    (suppress-keymap map)
  2512.     (define-key map "h" 'vm-summarize)
  2513.     (define-key map "\M-n" 'vm-next-unread-message)
  2514.     (define-key map "\M-p" 'vm-previous-unread-message)
  2515.     (define-key map "n" 'vm-next-message)
  2516.     (define-key map "p" 'vm-previous-message)
  2517.     (define-key map "N" 'vm-next-message-no-skip)
  2518.     (define-key map "P" 'vm-previous-message-no-skip)
  2519.     (define-key map "\C-\M-n" 'vm-move-message-forward)
  2520.     (define-key map "\C-\M-p" 'vm-move-message-backward)
  2521.     (define-key map "\t" 'vm-goto-message-last-seen)
  2522.     (define-key map "\r" 'vm-goto-message)
  2523.     (define-key map "^" 'vm-goto-parent-message)
  2524.     (define-key map "t" 'vm-expose-hidden-headers)
  2525.     (define-key map " " 'vm-scroll-forward)
  2526.     (define-key map "b" 'vm-scroll-backward)
  2527.     (define-key map "\C-?" 'vm-scroll-backward)
  2528.     (define-key map [delete] 'vm-scroll-backward)
  2529.     (define-key map [backspace] 'vm-scroll-backward)
  2530.     (define-key map "D" 'vm-decode-mime-message)
  2531.     (define-key map "d" 'vm-delete-message)
  2532.     (define-key map "\C-d" 'vm-delete-message-backward)
  2533.     (define-key map "u" 'vm-undelete-message)
  2534.     (define-key map "U" 'vm-unread-message)
  2535.     (define-key map "e" 'vm-edit-message)
  2536.     (define-key map "a" 'vm-set-message-attributes)
  2537.     (define-key map "j" 'vm-discard-cached-data)
  2538.     (define-key map "k" 'vm-kill-subject)
  2539.     (define-key map "f" 'vm-followup)
  2540.     (define-key map "F" 'vm-followup-include-text)
  2541.     (define-key map "r" 'vm-reply)
  2542.     (define-key map "R" 'vm-reply-include-text)
  2543.     (define-key map "\M-r" 'vm-resend-bounced-message)
  2544.     (define-key map "B" 'vm-resend-message)
  2545.     (define-key map "z" 'vm-forward-message)
  2546.     (define-key map "c" 'vm-continue-composing-message)
  2547.     (define-key map "@" 'vm-send-digest)
  2548.     (define-key map "*" 'vm-burst-digest)
  2549.     (define-key map "m" 'vm-mail)
  2550.     (define-key map "g" 'vm-get-new-mail)
  2551.     (define-key map "G" 'vm-sort-messages)
  2552.     (define-key map "v" 'vm-visit-folder)
  2553.     (define-key map "s" 'vm-save-message)
  2554.     (define-key map "w" 'vm-save-message-sans-headers)
  2555.     (define-key map "A" 'vm-auto-archive-messages)
  2556.     (define-key map "S" 'vm-save-folder)
  2557.     (define-key map "|" 'vm-pipe-message-to-command)
  2558.     (define-key map "#" 'vm-expunge-folder)
  2559.     (define-key map "q" 'vm-quit)
  2560.     (define-key map "x" 'vm-quit-no-change)
  2561.     (define-key map "i" 'vm-iconify-frame)
  2562.     (define-key map "?" 'vm-help)
  2563.     (define-key map "\C-_" 'vm-undo)
  2564.     (define-key map [(control /)] 'vm-undo)
  2565.     (define-key map "\C-xu" 'vm-undo)
  2566.     (define-key map "!" 'shell-command)
  2567.     (define-key map "<" 'vm-beginning-of-message)
  2568.     (define-key map ">" 'vm-end-of-message)
  2569.     (define-key map "\M-s" 'vm-isearch-forward)
  2570.     (define-key map "=" 'vm-summarize)
  2571.     (define-key map "L" 'vm-load-init-file)
  2572.     (define-key map "l" (make-sparse-keymap))
  2573.     (define-key map "la" 'vm-add-message-labels)
  2574.     (define-key map "le" 'vm-add-existing-message-labels)
  2575.     (define-key map "ld" 'vm-delete-message-labels)
  2576.     (define-key map "V" (make-sparse-keymap))
  2577.     (define-key map "VV" 'vm-visit-virtual-folder)
  2578.     (define-key map "VC" 'vm-create-virtual-folder)
  2579.     (define-key map "VA" 'vm-create-virtual-folder-same-author)
  2580.     (define-key map "VS" 'vm-create-virtual-folder-same-subject)
  2581.     (define-key map "VX" 'vm-apply-virtual-folder)
  2582.     (define-key map "VM" 'vm-toggle-virtual-mirror)
  2583.     (define-key map "V?" 'vm-virtual-help)
  2584.     (define-key map "M" (make-sparse-keymap))
  2585.     (define-key map "MN" 'vm-next-command-uses-marks)
  2586.     (define-key map "Mn" 'vm-next-command-uses-marks)
  2587.     (define-key map "MM" 'vm-mark-message) 
  2588.     (define-key map "MU" 'vm-unmark-message)
  2589.     (define-key map "Mm" 'vm-mark-all-messages)
  2590.     (define-key map "Mu" 'vm-clear-all-marks)
  2591.     (define-key map "MC" 'vm-mark-matching-messages)
  2592.     (define-key map "Mc" 'vm-unmark-matching-messages)
  2593.     (define-key map "MT" 'vm-mark-thread-subtree)
  2594.     (define-key map "Mt" 'vm-unmark-thread-subtree)
  2595.     (define-key map "MS" 'vm-mark-messages-same-subject)
  2596.     (define-key map "Ms" 'vm-unmark-messages-same-subject)
  2597.     (define-key map "MA" 'vm-mark-messages-same-author)
  2598.     (define-key map "Ma" 'vm-unmark-messages-same-author)
  2599.     (define-key map "MR" 'vm-mark-summary-region)
  2600.     (define-key map "Mr" 'vm-unmark-summary-region)
  2601.     (define-key map "MV" 'vm-toggle-all-marks)
  2602.     (define-key map "MX" 'vm-mark-matching-messages-with-virtual-folder)
  2603.     (define-key map "Mx" 'vm-unmark-matching-messages-with-virtual-folder)
  2604.     (define-key map "M?" 'vm-mark-help)
  2605.     (define-key map "W" (make-sparse-keymap))
  2606.     (define-key map "WW" 'vm-apply-window-configuration)
  2607.     (define-key map "WS" 'vm-save-window-configuration)
  2608.     (define-key map "WD" 'vm-delete-window-configuration)
  2609.     (define-key map "W?" 'vm-window-help)
  2610.     (define-key map "\C-t" 'vm-toggle-threads-display)
  2611.     (define-key map "\C-x\C-s" 'vm-save-buffer)
  2612.     (define-key map "\C-x\C-w" 'vm-write-file)
  2613.     (define-key map "\C-x\C-q" 'vm-toggle-read-only)
  2614.     (define-key map "%" 'vm-change-folder-type)
  2615.     (define-key map "\M-C" 'vm-show-copying-restrictions)
  2616.     (define-key map "\M-W" 'vm-show-no-warranty)
  2617.     ;; suppress-keymap provides these, but now that we don't use
  2618.     ;; suppress-keymap anymore...
  2619.     (define-key map "0" 'digit-argument)
  2620.     (define-key map "1" 'digit-argument)
  2621.     (define-key map "2" 'digit-argument)
  2622.     (define-key map "3" 'digit-argument)
  2623.     (define-key map "4" 'digit-argument)
  2624.     (define-key map "5" 'digit-argument)
  2625.     (define-key map "6" 'digit-argument)
  2626.     (define-key map "7" 'digit-argument)
  2627.     (define-key map "8" 'digit-argument)
  2628.     (define-key map "9" 'digit-argument)
  2629.     (define-key map "-" 'negative-argument)
  2630.     (cond ((fboundp 'set-keymap-name)
  2631.        (set-keymap-name map 'vm-mode-map)
  2632.        (set-keymap-name (lookup-key map "l")
  2633.                 "VM mode message labels map")
  2634.        (set-keymap-name (lookup-key map "V")
  2635.                 "VM mode virtual folders map")
  2636.        (set-keymap-name (lookup-key map "M")
  2637.                 "VM mode message marks map")
  2638.        (set-keymap-name (lookup-key map "W")
  2639.                 "VM mode window configuration map")))
  2640.  
  2641.     map )
  2642.   "Keymap for VM mode.")
  2643.  
  2644. (defvar vm-summary-mode-map vm-mode-map
  2645.   "Keymap for VM Summary mode")
  2646.  
  2647. (defvar vm-mail-mode-map 
  2648.   (let ((map (make-sparse-keymap)))
  2649.     (define-key map "\C-c\C-v" vm-mode-map)
  2650.     (define-key map "\C-c\C-p" 'vm-mime-preview-composition)
  2651.     (define-key map "\C-c\C-e" 'vm-mime-encode-composition)
  2652.     (define-key map "\C-c\C-a" 'vm-mime-attach-file)
  2653. ;;    (define-key map "\C-c\C-m" 'vm-mime-attach-mime-file)
  2654.     (define-key map "\C-c\C-y" 'vm-yank-message)
  2655.     (define-key map "\C-c\C-s" 'vm-mail-send)
  2656.     (define-key map "\C-c\C-c" 'vm-mail-send-and-exit)
  2657.     (cond ((fboundp 'set-keymap-name)
  2658.        (set-keymap-name map 'vm-mail-mode-map)))
  2659.     map )
  2660.   "Keymap for VM Mail mode buffers.
  2661. Its parent keymap is mail-mode-map.")
  2662.  
  2663. (defvar vm-edit-message-map
  2664.   (let ((map (make-sparse-keymap)))
  2665.     (define-key map "\C-c\C-v" vm-mode-map)
  2666.     (define-key map "\C-c\e" 'vm-edit-message-end)
  2667.     (define-key map "\C-c\C-c" 'vm-edit-message-end)
  2668.     (define-key map "\C-c\C-]" 'vm-edit-message-abort)
  2669.     (cond ((fboundp 'set-keymap-name)
  2670.        (set-keymap-name map 'vm-edit-message-map)))
  2671.     map )
  2672.   "Keymap for the buffers created by VM's vm-edit-message command.")
  2673.  
  2674. (defvar vm-folder-history nil
  2675.   "List of folders visited this Emacs session.")
  2676.  
  2677. ;; internal vars
  2678. (defvar vm-folder-type nil)
  2679. (make-variable-buffer-local 'vm-folder-type)
  2680. (defvar vm-message-list nil)
  2681. (make-variable-buffer-local 'vm-message-list)
  2682. (defvar vm-virtual-folder-definition nil)
  2683. (make-variable-buffer-local 'vm-virtual-folder-definition)
  2684. (defvar vm-virtual-buffers nil)
  2685. (make-variable-buffer-local 'vm-virtual-buffers)
  2686. (defvar vm-real-buffers nil)
  2687. (make-variable-buffer-local 'vm-real-buffers)
  2688. (defvar vm-message-pointer nil)
  2689. (make-variable-buffer-local 'vm-message-pointer)
  2690. (defvar vm-message-order-changed nil)
  2691. (make-variable-buffer-local 'vm-message-order-changed)
  2692. (defvar vm-message-order-header-present nil)
  2693. (make-variable-buffer-local 'vm-message-order-header-present)
  2694. (defvar vm-last-message-pointer nil)
  2695. (make-variable-buffer-local 'vm-last-message-pointer)
  2696. (defvar vm-mail-buffer nil)
  2697. (make-variable-buffer-local 'vm-mail-buffer)
  2698. (defvar vm-presentation-buffer nil)
  2699. (make-variable-buffer-local 'vm-presentation-buffer)
  2700. (defvar vm-presentation-buffer-handle nil)
  2701. (make-variable-buffer-local 'vm-presentation-buffer-handle)
  2702. (defvar vm-mime-decoded nil)
  2703. (make-variable-buffer-local 'vm-mime-decoded)
  2704. (defvar vm-summary-buffer nil)
  2705. (make-variable-buffer-local 'vm-summary-buffer)
  2706. (defvar vm-summary-pointer nil)
  2707. (make-variable-buffer-local 'vm-summary-pointer)
  2708. (defvar vm-system-state nil)
  2709. (make-variable-buffer-local 'vm-system-state)
  2710. (defvar vm-undo-record-list nil)
  2711. (make-variable-buffer-local 'vm-undo-record-list)
  2712. (defvar vm-saved-undo-record-list nil)
  2713. (make-variable-buffer-local 'vm-saved-undo-record-list)
  2714. (defvar vm-undo-record-pointer nil)
  2715. (make-variable-buffer-local 'vm-undo-record-pointer)
  2716. (defvar vm-last-save-folder nil)
  2717. (make-variable-buffer-local 'vm-last-save-folder)
  2718. (defvar vm-last-written-file nil)
  2719. (make-variable-buffer-local 'vm-last-written-file)
  2720. (defvar vm-last-visit-folder nil)
  2721. (defvar vm-last-pipe-command nil)
  2722. (make-variable-buffer-local 'vm-last-pipe-command)
  2723. (defvar vm-messages-not-on-disk 0)
  2724. (make-variable-buffer-local 'vm-messages-not-on-disk)
  2725. (defvar vm-totals nil)
  2726. (make-variable-buffer-local 'vm-totals)
  2727. (defvar vm-modification-counter 0)
  2728. (make-variable-buffer-local 'vm-modification-counter)
  2729. (defvar vm-flushed-modification-counter nil)
  2730. (make-variable-buffer-local 'vm-flushed-modification-counter)
  2731. (defvar vm-tempfile-counter 0)
  2732. (defvar vm-messages-needing-summary-update nil)
  2733. (defvar vm-buffers-needing-display-update nil)
  2734. (defvar vm-numbering-redo-start-point nil)
  2735. (make-variable-buffer-local 'vm-numbering-redo-start-point)
  2736. (defvar vm-numbering-redo-end-point nil)
  2737. (make-variable-buffer-local 'vm-numbering-redo-end-point)
  2738. (defvar vm-summary-redo-start-point nil)
  2739. (make-variable-buffer-local 'vm-summary-redo-start-point)
  2740. (defvar vm-need-summary-pointer-update nil)
  2741. (make-variable-buffer-local 'vm-need-summary-pointer-update)
  2742. (defvar vm-thread-obarray nil)
  2743. (make-variable-buffer-local 'vm-thread-obarray)
  2744. (defvar vm-thread-subject-obarray nil)
  2745. (make-variable-buffer-local 'vm-thread-subject-obarray)
  2746. (defvar vm-label-obarray nil)
  2747. (make-variable-buffer-local 'vm-label-obarray)
  2748. (defvar vm-block-new-mail nil)
  2749. (make-variable-buffer-local 'vm-block-new-mail)
  2750. (defvar vm-saved-buffer-modified-p nil)
  2751. (make-variable-buffer-local 'vm-saved-buffer-modified-p)
  2752. (defvar vm-kept-mail-buffers nil)
  2753. (defvar vm-inhibit-write-file-hook nil)
  2754. ;; used to choose between the default and
  2755. ;; mail-extract-address-components but I don't see the utility of
  2756. ;; it anymore.  It tries to be too smart.
  2757. ;;(defvar vm-chop-full-name-function 'vm-choose-chop-full-name-function)
  2758. (defvar vm-chop-full-name-function 'vm-default-chop-full-name)
  2759. (defvar vm-session-beginning t)
  2760. (defvar vm-init-file-loaded nil)
  2761. (defvar vm-window-configurations nil)
  2762. (defvar vm-window-configuration nil)
  2763. (defvar vm-message-id-number 0)
  2764. (defconst vm-spool-directory
  2765.   (or (and (boundp 'rmail-spool-directory) rmail-spool-directory)
  2766.       "/usr/spool/mail/"))
  2767. (defconst vm-content-length-search-regexp "^Content-Length:.*\n\\|\\(\n\n\\)")
  2768. (defconst vm-content-length-header "Content-Length:")
  2769. (defconst vm-attributes-header-regexp
  2770.   "^X-VM-\\(Attributes\\|v5-Data\\):\\(.*\n\\([ \t].*\n\\)*\\)")
  2771. (defconst vm-attributes-header "X-VM-v5-Data:")
  2772. (defconst vm-message-order-header-regexp "^X-VM-Message-Order:")
  2773. (defconst vm-message-order-header "X-VM-Message-Order:")
  2774. (defconst vm-bookmark-header-regexp "^X-VM-Bookmark:")
  2775. (defconst vm-bookmark-header "X-VM-Bookmark:")
  2776. (defconst vm-pop-retrieved-header-regexp "^X-VM-POP-Retrieved:")
  2777. (defconst vm-pop-retrieved-header "X-VM-POP-Retrieved:")
  2778. (defconst vm-last-modified-header-regexp "^X-VM-Last-Modified:")
  2779. (defconst vm-last-modified-header "X-VM-Last-Modified:")
  2780. (defconst vm-summary-header-regexp "^X-VM-Summary-Format:")
  2781. (defconst vm-summary-header "X-VM-Summary-Format:")
  2782. (defconst vm-vheader-header-regexp "^X-VM-VHeader:")
  2783. (defconst vm-vheader-header "X-VM-VHeader:")
  2784. (defconst vm-labels-header-regexp "^X-VM-Labels:")
  2785. (defconst vm-labels-header "X-VM-Labels:")
  2786. (defconst vm-berkeley-mail-status-header "Status: ")
  2787. (defconst vm-berkeley-mail-status-header-regexp "^Status: \\(..?\\)\n")
  2788. (defvar vm-matched-header-vector (make-vector 6 nil))
  2789. (defconst vm-supported-folder-types
  2790.   '("From_" "From_-with-Content-Length" "mmdf" "babyl"))
  2791. (defconst vm-supported-window-configurations
  2792.   '(
  2793.     ("default")
  2794.     ("startup")
  2795.     ("quitting")
  2796.     ("composing-message")
  2797.     ("editing-message")
  2798.     ("marking-message")
  2799.     ("reading-message")
  2800.     ("searching-message")
  2801.     ("vm")
  2802.     ("vm-add-message-labels")
  2803.     ("vm-apply-virtual-folder")
  2804.     ("vm-auto-archive-messages")
  2805.     ("vm-beginning-of-message")
  2806.     ("vm-burst-digest")
  2807.     ("vm-burst-mime-digest")
  2808.     ("vm-burst-rfc1153-digest")
  2809.     ("vm-burst-rfc934-digest")
  2810.     ("vm-change-folder-type")
  2811.     ("vm-clear-all-marks")
  2812.     ("vm-continue-composing-message")
  2813.     ("vm-create-virtual-folder")
  2814.     ("vm-decode-mime-message")
  2815.     ("vm-delete-message")
  2816.     ("vm-delete-message-backward")
  2817.     ("vm-delete-message-labels")
  2818.     ("vm-discard-cached-data")
  2819.     ("vm-edit-message")
  2820.     ("vm-edit-message-abort")
  2821.     ("vm-edit-message-end")
  2822.     ("vm-edit-message-other-frame")
  2823.     ("vm-end-of-message")
  2824.     ("vm-expose-hidden-headers")
  2825.     ("vm-expunge-folder")
  2826.     ("vm-followup")
  2827.     ("vm-followup-include-text")
  2828.     ("vm-followup-include-text-other-frame")
  2829.     ("vm-followup-other-frame")
  2830.     ("vm-forward-message")
  2831.     ("vm-forward-message-all-headers")
  2832.     ("vm-forward-message-all-headers-other-frame")
  2833.     ("vm-forward-message-other-frame")
  2834.     ("vm-get-new-mail")
  2835.     ("vm-goto-message")
  2836.     ("vm-goto-message-last-seen")
  2837.     ("vm-goto-parent-message")
  2838.     ("vm-help")
  2839.     ("vm-isearch-forward")
  2840.     ("vm-kill-subject")
  2841.     ("vm-load-init-file")
  2842.     ("vm-mail")
  2843.     ("vm-mail-other-frame")
  2844.     ("vm-mail-other-window")
  2845.     ("vm-mail-send")
  2846.     ("vm-mail-send-and-exit")
  2847.     ("vm-mark-all-messages")
  2848.     ("vm-mark-help")
  2849.     ("vm-mark-matching-messages")
  2850.     ("vm-mark-message")
  2851.     ("vm-mark-messages-same-author")
  2852.     ("vm-mark-messages-same-subject")
  2853.     ("vm-mark-summary-region")
  2854.     ("vm-mark-thread-subtree")
  2855.     ("vm-mode")
  2856.     ("vm-move-message-backward")
  2857.     ("vm-move-message-backward-physically")
  2858.     ("vm-move-message-forward")
  2859.     ("vm-move-message-forward-physically")
  2860.     ("vm-next-command-uses-marks")
  2861.     ("vm-next-message")
  2862.     ("vm-next-message-no-skip")
  2863.     ("vm-next-message-no-skip")
  2864.     ("vm-next-message-same-subject")
  2865.     ("vm-next-unread-message")
  2866.     ("vm-other-frame")
  2867.     ("vm-other-window")
  2868.     ("vm-pipe-message-to-command")
  2869.     ("vm-previous-message")
  2870.     ("vm-previous-message-no-skip")
  2871.     ("vm-previous-message-no-skip")
  2872.     ("vm-previous-message-same-subject")
  2873.     ("vm-previous-unread-message")
  2874.     ("vm-quit")
  2875.     ("vm-quit-just-bury")
  2876.     ("vm-quit-just-iconify")
  2877.     ("vm-quit-no-change")
  2878.     ("vm-reply")
  2879.     ("vm-reply-include-text")
  2880.     ("vm-reply-include-text-other-frame")
  2881.     ("vm-reply-other-frame")
  2882.     ("vm-resend-bounced-message")
  2883.     ("vm-resend-bounced-message-other-frame")
  2884.     ("vm-resend-message")
  2885.     ("vm-resend-message-other-frame")
  2886.     ("vm-save-and-expunge-folder")
  2887.     ("vm-save-buffer")
  2888.     ("vm-save-folder")
  2889.     ("vm-save-message")
  2890.     ("vm-save-message-sans-headers")
  2891.     ("vm-scroll-backward")
  2892.     ("vm-scroll-forward")
  2893.     ("vm-send-digest")
  2894.     ("vm-send-digest-other-frame")
  2895.     ("vm-send-mime-digest")
  2896.     ("vm-send-mime-digest-other-frame")
  2897.     ("vm-send-rfc1153-digest")
  2898.     ("vm-send-rfc1153-digest-other-frame")
  2899.     ("vm-send-rfc934-digest")
  2900.     ("vm-send-rfc934-digest-other-frame")
  2901.     ("vm-set-message-attributes")
  2902.     ("vm-show-copying-restrictions")
  2903.     ("vm-show-no-warranty")
  2904.     ("vm-sort-messages")
  2905.     ("vm-submit-bug-report")
  2906.     ("vm-summarize")
  2907.     ("vm-summarize-other-frame")
  2908.     ("vm-toggle-read-only")
  2909.     ("vm-toggle-threads-display")
  2910.     ("vm-undelete-message")
  2911.     ("vm-undo")
  2912.     ("vm-unmark-matching-messages")
  2913.     ("vm-unmark-message")
  2914.     ("vm-unmark-messages-same-author")
  2915.     ("vm-unmark-messages-same-subject")
  2916.     ("vm-unmark-summary-region")
  2917.     ("vm-unmark-thread-subtree")
  2918.     ("vm-unread-message")
  2919.     ("vm-virtual-help")
  2920.     ("vm-visit-folder")
  2921.     ("vm-visit-folder-other-frame")
  2922.     ("vm-visit-folder-other-window")
  2923.     ("vm-visit-virtual-folder")
  2924.     ("vm-visit-virtual-folder-other-frame")
  2925.     ("vm-visit-virtual-folder-other-window")
  2926.     ("vm-write-file")
  2927.     ("vm-yank-message")
  2928.     ("vm-yank-message-other-folder")
  2929. ))
  2930. (defconst vm-supported-sort-keys
  2931.   '("date" "reversed-date"
  2932.     "author" "reversed-author"
  2933.     "subject" "reversed-subject"
  2934.     "recipients" "reversed-recipients"
  2935.     "line-count" "reversed-line-count"
  2936.     "byte-count" "reversed-byte-count"
  2937.     "physical-order" "reversed-physical-order"))
  2938. (defconst vm-supported-interactive-virtual-selectors
  2939.   '(("any")
  2940.     ("header")
  2941.     ("label")
  2942.     ("text")
  2943.     ("header-or-text")
  2944.     ("recipient")
  2945.     ("author")
  2946.     ("sender")
  2947.     ("author-or-recipient")
  2948.     ("sender-or-recipient")
  2949.     ("subject")
  2950.     ("sent-before")
  2951.     ("sent-after")
  2952.     ("more-chars-than")
  2953.     ("less-chars-than")
  2954.     ("more-lines-than")
  2955.     ("less-lines-than")
  2956.     ("new")
  2957.     ("unread")
  2958.     ("read")
  2959.     ("unseen")
  2960.     ("recent")
  2961.     ("deleted")
  2962.     ("replied")
  2963.     ("forwarded")
  2964.     ("redistributed")
  2965.     ("filed")
  2966.     ("written")
  2967.     ("edited")
  2968.     ("marked")
  2969.     ("undeleted")
  2970.     ("unreplied")
  2971.     ("unforwarded")
  2972.     ("unredistributed")
  2973.     ("unfiled")
  2974.     ("unwritten")
  2975.     ("unedited")
  2976.     ("unmarked")))
  2977. (defconst vm-virtual-selector-function-alist
  2978.   '((any . vm-vs-any)
  2979.     (and . vm-vs-and)
  2980.     (or . vm-vs-or)
  2981.     (not . vm-vs-not)
  2982.     (header . vm-vs-header)
  2983.     (label . vm-vs-label)
  2984.     (text . vm-vs-text)
  2985.     (header-or-text . vm-vs-header-or-text)
  2986.     (recipient . vm-vs-recipient)
  2987.     (author . vm-vs-author)
  2988.     (sender . vm-vs-sender)
  2989.     (author-or-recipient . vm-vs-author-or-recipient)
  2990.     (sender-or-recipient . vm-vs-sender-or-recipient)
  2991.     (subject . vm-vs-subject)
  2992.     (sent-before . vm-vs-sent-before)
  2993.     (sent-after . vm-vs-sent-after)
  2994.     (more-chars-than . vm-vs-more-chars-than)
  2995.     (less-chars-than . vm-vs-less-chars-than)
  2996.     (more-lines-than . vm-vs-more-lines-than)
  2997.     (less-lines-than . vm-vs-less-lines-than)
  2998.     (new . vm-vs-new)
  2999.     (unread . vm-vs-unread)
  3000.     (read . vm-vs-read)
  3001.     (unseen . vm-vs-unseen)
  3002.     (recent . vm-vs-recent)
  3003.     (deleted . vm-vs-deleted)
  3004.     (replied . vm-vs-replied)
  3005.     (answered . vm-vs-answered)
  3006.     (forwarded . vm-vs-forwarded)
  3007.     (redistributed . vm-vs-redistributed)
  3008.     (filed . vm-vs-filed)
  3009.     (written . vm-vs-written)
  3010.     (edited . vm-vs-edited)
  3011.     (marked . vm-vs-marked)
  3012.     (undeleted . vm-vs-undeleted)
  3013.     (unreplied . vm-vs-unreplied)
  3014.     (unanswered . vm-vs-unanswered)
  3015.     (unforwarded . vm-vs-unforwarded)
  3016.     (unredistributed . vm-vs-unredistributed)
  3017.     (unfiled . vm-vs-unfiled)
  3018.     (unwritten . vm-vs-unwritten)
  3019.     (unedited . vm-vs-unedited)
  3020.     (unmarked . vm-vs-unmarked)))
  3021.  
  3022. (defconst vm-supported-attribute-names
  3023.   '("new"
  3024.     "unread"
  3025.     "read"
  3026.     "deleted"
  3027.     "replied"
  3028.     "forwarded"
  3029.     "redistributed"
  3030.     "filed"
  3031.     "written"
  3032.     "edited"
  3033.     "undeleted"
  3034.     "unreplied"
  3035.     "unforwarded"
  3036.     "unredistributed"
  3037.     "unfiled"
  3038.     "unwritten"
  3039.     "unedited"
  3040.     ;; for babyl cogniscenti
  3041.     "recent"
  3042.     "unseen"
  3043.     "answered"
  3044.     "unanswered"))
  3045.  
  3046. (defvar vm-key-functions nil)
  3047. (defconst vm-digest-type-alist '(("rfc934") ("rfc1153") ("mime")))
  3048. (defvar vm-completion-auto-correct t
  3049.   "Non-nil means that minibuffer-complete-file should aggressively erase
  3050. the trailing part of a word that caused completion to fail, and retry
  3051. the completion with the resulting word.")
  3052. (defvar vm-minibuffer-completion-table nil
  3053.   "Completion table used by vm-minibuffer-complete-word.
  3054. Should be just a list of strings, not an alist or an obarray.")
  3055. (defvar vm-completion-auto-space t
  3056.   "Non-nil value means that vm-minibuffer-complete-word should automatically
  3057. append a space to words that complete unambiguously.")
  3058. (defconst vm-attributes-vector-length 9)
  3059. (defconst vm-cache-vector-length 21)
  3060. (defconst vm-softdata-vector-length 19)
  3061. (defconst vm-location-data-vector-length 6)
  3062. (defconst vm-mirror-data-vector-length 5)
  3063. (defconst vm-startup-message-lines
  3064.   '("Please use \\[vm-submit-bug-report] to report bugs."
  3065.     "For discussion about the VM mail reader, see the gnu.emacs.vm.info newsgroup"
  3066.     "You may give out copies of VM.  Type \\[vm-show-copying-restrictions] to see the conditions"
  3067.     "VM comes with ABSOLUTELY NO WARRANTY; type \\[vm-show-no-warranty] for full details"
  3068.     "In Stereo (where available)"))
  3069. (defconst vm-startup-message-displayed nil)
  3070. ;; for the mode line
  3071. (defvar vm-mode-line-format
  3072.   '("" "  %&%& "
  3073.     ("VM " vm-version ": "
  3074.      (vm-folder-read-only "read-only ")
  3075.      (vm-virtual-folder-definition (vm-virtual-mirror "mirrored "))
  3076.      "%b"
  3077.      (vm-mail-buffer (vm-ml-sort-keys ("" " by " vm-ml-sort-keys)))
  3078.      (vm-message-list
  3079.       ("   " vm-ml-message-number
  3080.        " (of " vm-ml-highest-message-number ")")
  3081.       (vm-folder-type
  3082.        "   (unrecognized folder type)"
  3083.        "   (no messages)")))
  3084.     (vm-spooled-mail-waiting " Mail")
  3085.     (vm-message-list
  3086.      ("  %[ " vm-ml-message-attributes-alist
  3087.       (vm-ml-labels ("; " vm-ml-labels)) " %]    ")
  3088.      ("  %[%]   "))
  3089.     "%p" "   " global-mode-string))
  3090.  
  3091. (defvar vm-ml-message-attributes-alist
  3092.   '((vm-ml-message-new
  3093.      "new"
  3094.      (vm-ml-message-unread
  3095.       "unread"
  3096.       (vm-ml-message-read "read")))
  3097.     (vm-ml-message-edited " edited")
  3098.     (vm-ml-message-filed " filed")
  3099.     (vm-ml-message-written " written")
  3100.     (vm-ml-message-replied " replied")
  3101.     (vm-ml-message-forwarded " forwarded")
  3102.     (vm-ml-message-redistributed " redistributed")
  3103.     (vm-ml-message-deleted " deleted")
  3104.     (vm-ml-message-marked " MARKED")))
  3105. (defvar vm-ml-message-number nil)
  3106. (make-variable-buffer-local 'vm-ml-message-number)
  3107. (defvar vm-ml-highest-message-number nil)
  3108. (make-variable-buffer-local 'vm-ml-highest-message-number)
  3109. (defvar vm-ml-sort-keys nil)
  3110. (make-variable-buffer-local 'vm-ml-sort-keys)
  3111. (defvar vm-ml-labels nil)
  3112. (make-variable-buffer-local 'vm-ml-labels)
  3113. ; unused now
  3114. ;(defvar vm-ml-attributes-string nil)
  3115. ;(make-variable-buffer-local 'vm-ml-attributes-string)
  3116. (defvar vm-ml-message-new nil)
  3117. (make-variable-buffer-local 'vm-ml-message-new)
  3118. (defvar vm-ml-message-unread nil)
  3119. (make-variable-buffer-local 'vm-ml-message-unread)
  3120. (defvar vm-ml-message-read nil)
  3121. (make-variable-buffer-local 'vm-ml-message-read)
  3122. (defvar vm-ml-message-edited nil)
  3123. (make-variable-buffer-local 'vm-ml-message-edited)
  3124. (defvar vm-ml-message-replied nil)
  3125. (make-variable-buffer-local 'vm-ml-message-replied)
  3126. (defvar vm-ml-message-forwarded nil)
  3127. (make-variable-buffer-local 'vm-ml-message-forwarded)
  3128. (defvar vm-ml-message-redistributed nil)
  3129. (make-variable-buffer-local 'vm-ml-message-redistributed)
  3130. (defvar vm-ml-message-deleted nil)
  3131. (make-variable-buffer-local 'vm-ml-message-deleted)
  3132. (defvar vm-ml-message-filed nil)
  3133. (make-variable-buffer-local 'vm-ml-message-filed)
  3134. (defvar vm-ml-message-written nil)
  3135. (make-variable-buffer-local 'vm-ml-message-written)
  3136. (defvar vm-ml-message-marked nil)
  3137. (make-variable-buffer-local 'vm-ml-message-marked)
  3138. ;; to make the tanjed compiler shut up
  3139. (defvar vm-pop-read-point nil)
  3140. (defvar vm-pop-ok-to-ask nil)
  3141. (defvar vm-reply-list nil)
  3142. (defvar vm-forward-list nil)
  3143. (defvar vm-redistribute-list nil)
  3144. (defvar current-itimer nil)
  3145. (defvar current-menubar nil)
  3146. (defvar scrollbar-height nil)
  3147. (defvar top-toolbar nil)
  3148. (defvar top-toolbar-height nil)
  3149. (defvar bottom-toolbar nil)
  3150. (defvar bottom-toolbar-height nil)
  3151. (defvar right-toolbar nil)
  3152. (defvar right-toolbar-width nil)
  3153. (defvar left-toolbar nil)
  3154. (defvar left-toolbar-width nil)
  3155. ;; this defvar matches the XEmacs one so it doesn't matter if VM
  3156. ;; is loaded before highlight-headers.el
  3157. (defvar highlight-headers-regexp "Subject[ \t]*:")
  3158. (defvar vm-url-regexp
  3159.   "<URL:\\([^>\n]+\\)>\\|\\(\\(file\\|ftp\\|gopher\\|http\\|https\\|news\\|wais\\|www\\)://[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]\\)\\|\\(mailto:[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]\\)"
  3160.   "Regular expression that matches an absolute URL.
  3161. The URL itself must be matched by a \\(..\\) grouping.
  3162. VM will extract the URL by copying the lowest number grouping
  3163. that has a match.")
  3164. (defconst vm-month-alist
  3165.   '(("jan" "January" "1")
  3166.     ("feb" "February" "2")
  3167.     ("mar" "March" "3")
  3168.     ("apr" "April" "4")
  3169.     ("may" "May" "5")
  3170.     ("jun" "June" "6")
  3171.     ("jul" "July" "7")
  3172.     ("aug" "August" "8")
  3173.     ("sep" "September" "9")
  3174.     ("oct" "October" "10")
  3175.     ("nov" "November" "11")
  3176.     ("dec" "December" "12")))
  3177. (defvar vm-pop-passwords nil)
  3178. (defvar vm-pop-retrieved-messages nil)
  3179. (make-variable-buffer-local 'vm-pop-retrieved-messages)
  3180. (defvar pop-up-frames nil)
  3181. (defvar vm-parse-date-workspace (make-vector 6 nil))
  3182. ;; cache so we don't call timezone-make-date-sortable so much.
  3183. ;; messages have their own cache; this is for the virtual folder
  3184. ;; alist selectors.
  3185. (defvar vm-sortable-date-alist nil)
  3186. (defvar vm-summary-=> nil)
  3187. (defvar vm-summary-no-=> nil)
  3188. (defvar vm-summary-overlay nil)
  3189. (make-variable-buffer-local 'vm-summary-overlay)
  3190. (defvar vm-thread-loop-obarray (make-vector 29 0))
  3191. (defvar vm-delete-duplicates-obarray (make-vector 29 0))
  3192. (defvar vm-image-obarray (make-vector 29 0))
  3193. (defvar vm-mail-mode-map-parented nil)
  3194. (defvar vm-xface-cache (make-vector 29 0))
  3195. (defvar vm-mf-default-action nil)
  3196. (defvar vm-mime-compiled-format-alist nil)
  3197. (defvar vm-mime-default-action-string-alist
  3198.   '(("text" . "display text")
  3199.     ("multipart/alternative" . "display selected part")
  3200.     ("multipart/digest" . "read digest")
  3201.     ("multipart/parallel" . "display in parallel")
  3202.     ("multipart" . "display parts")
  3203.     ("message/partial" . "attempt message aseembly")
  3204.     ("message" . "display message")
  3205.     ("audio" . "play audio")
  3206.     ("video" . "display video")
  3207.     ("image" . "display image")
  3208.     ("model" . "display model")
  3209.     ("application/postscript" . "display PostScript")
  3210.     ("application" . "save to a file")))
  3211.  
  3212. (defvar vm-mime-type-description-alist
  3213.   '(("multipart/digest" . "digest")
  3214.     ("multipart/alternative" . "multipart alternative")
  3215.     ("multipart/parallel" . "multipart parallel")
  3216.     ("multipart" . "multipart message")
  3217.     ("text/plain" . "plain text")
  3218.     ("text/enriched" . "enriched text")
  3219.     ("text/html" . "HTML")
  3220.     ("image/gif" . "GIF image")
  3221.     ("image/tiff" . "TIFF image")
  3222.     ("image/jpeg" . "JPEG image")
  3223.     ("image/png" . "PNG image")
  3224.     ("message/rfc822" . "mail message")
  3225.     ("message/news" . "USENET news article")
  3226.     ("message/partial" . "message fragment")
  3227.     ("application/postscript" . "PostScript")
  3228.     ("application/octet-stream" . "untyped binary data")))
  3229.  
  3230. (defconst vm-mime-base64-alphabet
  3231.   (concat
  3232.    [
  3233.      65  66  67  68  69  70  71  72  73  74  75  76  77
  3234.      78  79  80  81  82  83  84  85  86  87  88  89  90
  3235.      97  98  99 100 101 102 103 104 105 106 107 108 109
  3236.     110 111 112 113 114 115 116 117 118 119 120 121 122
  3237.      48  49  50  51  52  53  54  55  56  57  43  47
  3238.    ]
  3239.   ))
  3240. (defconst vm-mime-base64-alphabet-decoding-vector
  3241.   [
  3242.      0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  3243.      0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  3244.      0  0  0  0  0  0  0  0  0  0  0 62  0  0  0 63
  3245.     52 53 54 55 56 57 58 59 60 61  0  0  0  0  0  0
  3246.      0  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14
  3247.     15 16 17 18 19 20 21 22 23 24 25  0  0  0  0  0
  3248.      0 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
  3249.     41 42 43 44 45 46 47 48 49 50 51  0  0  0  0  0
  3250.   ])
  3251.  
  3252. ;;(defconst vm-mime-base64-alphabet-decoding-alist
  3253. ;;  '(
  3254. ;;    ( 65 . 00) ( 66 . 01) ( 67 . 02) ( 68 . 03) ( 69 . 04) ( 70 . 05)
  3255. ;;    ( 71 . 06) ( 72 . 07) ( 73 . 08) ( 74 . 09) ( 75 . 10) ( 76 . 11)
  3256. ;;    ( 77 . 12) ( 78 . 13) ( 79 . 14) ( 80 . 15) ( 81 . 16) ( 82 . 17)
  3257. ;;    ( 83 . 18) ( 84 . 19) ( 85 . 20) ( 86 . 21) ( 87 . 22) ( 88 . 23)
  3258. ;;    ( 89 . 24) ( 90 . 25) ( 97 . 26) ( 98 . 27) ( 99 . 28) (100 . 29)
  3259. ;;    (101 . 30) (102 . 31) (103 . 32) (104 . 33) (105 . 34) (106 . 35)
  3260. ;;    (107 . 36) (108 . 37) (109 . 38) (110 . 39) (111 . 40) (112 . 41)
  3261. ;;    (113 . 42) (114 . 43) (115 . 44) (116 . 45) (117 . 46) (118 . 47)
  3262. ;;    (119 . 48) (120 . 49) (121 . 50) (122 . 51) ( 48 . 52) ( 49 . 53)
  3263. ;;    ( 50 . 54) ( 51 . 55) ( 52 . 56) ( 53 . 57) ( 54 . 58) ( 55 . 59)
  3264. ;;    ( 56 . 60) ( 57 . 61) ( 43 . 62) ( 47 . 63)
  3265. ;;   ))
  3266. ;;
  3267. ;;(defvar vm-mime-base64-alphabet-decoding-vector
  3268. ;;  (let ((v (make-vector 123 nil))
  3269. ;;    (p vm-mime-base64-alphabet-decoding-alist))
  3270. ;;    (while p
  3271. ;;      (aset v (car (car p)) (cdr (car p)))
  3272. ;;      (setq p (cdr p)))
  3273. ;;    v ))
  3274.  
  3275. (defvar vm-message-garbage-alist nil)
  3276. (make-variable-buffer-local 'vm-message-garbage-alist)
  3277. (defvar vm-folder-garbage-alist nil)
  3278. (make-variable-buffer-local 'vm-folder-garbage-alist)
  3279. (defconst vm-mime-header-list '("MIME-Version:" "Content-"))
  3280. (defconst vm-mime-mule-charset-to-coding-alist
  3281.   '(
  3282.     ("us-ascii"        no-conversion)
  3283.     ("iso-8859-1"    no-conversion)
  3284.     ("iso-8859-2"    iso-8859-2)
  3285.     ("iso-8859-3"    iso-8859-3)
  3286.     ("iso-8859-4"    iso-8859-4)
  3287.     ("iso-8859-5"    iso-8859-5)
  3288.     ("iso-8859-6"    iso-8859-6)
  3289.     ("iso-8859-7"    iso-8859-7)
  3290.     ("iso-8859-8"    iso-8859-8)
  3291.     ("iso-8859-9"    iso-8859-9)
  3292.     ("iso-2022-jp"    iso-2022-jp)
  3293.     ;; probably not correct, but probably better than nothing.
  3294.     ("iso-2022-jp-2"    iso-2022-jp)
  3295.     ("iso-2022-int-1"    iso-2022-int-1)
  3296.     ("iso-2022-kr"    iso-2022-kr)
  3297.     ("euc-kr"        iso-2022-kr)
  3298.    ))
  3299. (defvar vm-mime-mule-charset-to-charset-alist
  3300.   '(
  3301.     (latin-iso8859-1    "iso-8859-1")
  3302.     (latin-iso8859-2    "iso-8859-2")
  3303.     (latin-iso8859-3    "iso-8859-3")
  3304.     (latin-iso8859-4    "iso-8859-4")
  3305.     (cyrillic-iso8859-5    "iso-8859-5")
  3306.     (arabic-iso8859-6    "iso-8859-6")
  3307.     (greek-iso8859-7    "iso-8859-7")
  3308.     (hebrew-iso8859-8    "iso-8859-8")
  3309.     (latin-iso8859-9    "iso-8859-9")
  3310.     (japanese-jisx0208    "iso-2022-jp")
  3311.     (korean-ksc5601    "iso-2022-kr")
  3312.     (chinese-gb2312    "iso-2022-jp")
  3313.     (sisheng        "iso-2022-jp")
  3314.     (thai-tis620    "iso-2022-jp")
  3315.    ))
  3316. (defvar vm-mime-mule-coding-to-charset-alist
  3317.   '(
  3318.     (iso-2022-8        "iso-2022-jp")
  3319.     (iso-2022-7-unix    "iso-2022-jp")
  3320.     (iso-2022-7-dos    "iso-2022-jp")
  3321.     (iso-2022-7-mac    "iso-2022-jp")
  3322.    ))
  3323. (defconst vm-mime-charset-completion-alist
  3324.   '(
  3325.     ("us-ascii")
  3326.     ("iso-8859-1")
  3327.     ("iso-8859-2")
  3328.     ("iso-8859-3")
  3329.     ("iso-8859-4")
  3330.     ("iso-8859-5")
  3331.     ("iso-8859-6")
  3332.     ("iso-8859-7")
  3333.     ("iso-8859-8")
  3334.     ("iso-8859-9")
  3335.     ("iso-2022-jp")
  3336.     ("iso-2022-jp-2")
  3337.     ("iso-2022-int-1")
  3338.     ("iso-2022-kr")
  3339.    ))
  3340. (defconst vm-mime-type-completion-alist
  3341.   '(
  3342.     ("text/plain")
  3343.     ("text/enriched")
  3344.     ("text/html")
  3345.     ("audio/basic")
  3346.     ("image/jpeg")
  3347.     ("image/png")
  3348.     ("image/gif")
  3349.     ("image/tiff")
  3350.     ("video/mpeg")
  3351.     ("application/postscript")
  3352.     ("application/octet-stream")
  3353.     ("message/rfc822")
  3354.     ("message/news")
  3355.    ))
  3356. (defconst vm-mime-encoded-word-regexp
  3357.   "=\\?\\([^?]+\\)\\?\\([BQ]\\)\\?\\([^?]+\\)\\?=")
  3358. ;; for MS-DOS and Windows NT
  3359. ;;    nil value means text file
  3360. ;;      t value means binary file
  3361. ;; presumably it controls whether LF -> CRLF mapping is done
  3362. ;; when writing to files.
  3363. (defvar buffer-file-type)
  3364. (defvar vm-frame-list nil)
  3365. (if (not (boundp 'shell-command-switch))
  3366.     (defvar shell-command-switch "-c"))
  3367.  
  3368. (defconst vm-xemacs-p nil)
  3369. (defconst vm-xemacs-mule-p nil)
  3370. (defconst vm-fsfemacs-p nil)
  3371. (defconst vm-fsfemacs-mule-p nil)
  3372. (defun vm-xemacs-p () vm-xemacs-p)
  3373. (defun vm-xemacs-mule-p () vm-xemacs-mule-p)
  3374. (defun vm-fsfemacs-p () vm-fsfemacs-p)
  3375. (defun vm-fsfemacs-mule-p () vm-fsfemacs-mule-p)
  3376. (defun vm-note-emacs-version ()
  3377.   (setq vm-xemacs-p (string-match "XEmacs" emacs-version)
  3378.     vm-xemacs-mule-p (and vm-xemacs-p (featurep 'mule)
  3379.                   ;; paranoia
  3380.                   (fboundp 'set-file-coding-system))
  3381.     vm-fsfemacs-p (not vm-xemacs-p)
  3382.     vm-fsfemacs-mule-p (and (not vm-xemacs-mule-p) (featurep 'mule)
  3383.                 (fboundp 'set-buffer-file-coding-system))))
  3384. (vm-note-emacs-version)
  3385.